subject

Not all dogs like to bark, but some like to make a lot of noise! In this exercise we have a Dog superclass and a LoudDog subclass. You do not need to modify the Dog class. Your task is to write two override methods in the LoudDog class. You will override the speak method to return BARK! . You will then override the toString so that it returns Clover is loud and likes to BARK! where Clover is replaced by the name variable. Create and print at least one Dog and one LoudDog to test. Status: Not Submitted 9.3.6: Dogs Bark Save Submit + Continue iii FILES DogTester. java Dog. java LoudDog. java 1 public class Dog 2 - { 3 private String name; 4 5 public Dog(String name) { 6 this. name = name; 7 } 8 9 public String getName() { 10 return name; 11 } 12 13 public String speak() { 14 return "Bark!"; } 16 17 public String tostring() { 18 return name + likes to " 19 } 20 } + speak(); Status: Not Submitted 9.3.6: Dogs Bark FILES 1 public class LoudDog extends Dog 2 - { 3 4. public LoudDog(String name) { 5 super (name); 6 } 7 8 // override the speak method here 9 10 11 //override the tostring here. 1 //Remember, you can access the name using super. getName() 13 } 14 0 DogTester. java Dog. java LoudDog. java

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:20
Your program will make use of long long int variables for all calculations. note: the use of long long int requires that you have c++11 support. you should have this automatically if you are using a newer version of visual studio. the support is there for gcc as well, but you may need the -std=c++11 or -std=c++0x compiler flag. you first need to read in the total number of seconds. there is no prompt for the read (that is, you just do the cin without using a cout to display a prompt). this is going to seem a little strange when you are running your program in your ide
Answers: 2
question
Computers and Technology, 22.06.2019 09:40
Sarah is having a hard time finding a template for her advertising business that she may be able to use at a later date and also make it available to her colleagues
Answers: 1
question
Computers and Technology, 22.06.2019 15:00
Which of the following statements tests if students have a grade of 70 or above, as well as fewer than five absences? a: if(grade > = 70 and daysabsent < = 5): b: if(grade > = 70 or daysabsent < = 5): c: if(grade > 70 and daysabsent < = 5): d: if(grade > 70 or daysabsent < = 5): i took the test the answer is a
Answers: 1
question
Computers and Technology, 23.06.2019 18:30
How often does colleges update the cost of attendance on their website? . a)every two years b) every four years c) every year d) every semester
Answers: 1
You know the right answer?
Not all dogs like to bark, but some like to make a lot of noise! In this exercise we have a Dog supe...
Questions
question
Mathematics, 09.11.2020 15:40
question
Health, 09.11.2020 15:40
question
Social Studies, 09.11.2020 15:40
question
Mathematics, 09.11.2020 15:40
question
Physics, 09.11.2020 15:40
Questions on the website: 13722362