Loading
notes intro/old submit AP Problems the dump links
 

Inheritance Warmup

 

 

Create 2 classes Dog and Cat that extend Animal. Update speak,species and with relevant info.

 

Have a method in Cat and Dog - toHumanYears (which will print out how many years that animal is in human years [dog is 7yrs, cats is 4 yrs]).

 

Create a new subclass of Dog called PoundDog that will extend Dog. Its constructor will initialize a dog but only have weight and visableAge (as a String (they will put in - puppie, young, middle age, old) . The name will automatically be set to "Unknown", the age is -1.

Override the talk command so that it calls the talk of the dog class then, "please take me home, I dont want to be put down :<"

 

Create a new method beg that will beg.

Override toString so that it returns - "This 12lb pound dog is a puppie, and is of unknown age."

Override the eat so it will do the dogs eat then beg, then have it do dogs eat with 1/2 as much food.