Objective
Create a program that has one dog object that is made from the dog class. The dog class must inherit methods and attributes from an ‘animal’ class. You must create two getter functions to get attributes, and one setter function for the animal class. The dog class must have two methods , one to make noise and one to exercise. You will need to implement the scanner function to ask the user to do things.
Here is what the output will look like...
Java
Enter a command: Set name, Get eyes, Get legs, exercise, make noise, or stop to stop:
get eyes
your pet has 2 eyes!
Enter a command: Set name, Get eyes, Get legs, exercise, make noise, or stop to stop:
get legs
your pet has 4 legs!
Enter a command: Set name, Get eyes, Get legs, exercise, make noise, or stop to stop:
exercise
The dog does for a walk
Enter a command: Set name, Get eyes, Get legs, exercise, make noise, or stop to stop:
a command
That is not an option, try again
Enter a command: Set name, Get eyes, Get legs, exercise, make noise, or stop to stop:
make noise
The dog says woof
Enter a command: Set name, Get eyes, Get legs, exercise, make noise, or stop to stop:
stop