Create a driver class called XXXKennel, whose main method instantiates and updates two Dog objects: Create a
Fantastic news! We've Found the answer you've been seeking!
Question:
Create a driver class called XXXKennel, whose main method instantiates and updates two Dog objects:
- Create a XXXDog object called dog1 and sets its name and age to your preference by calling the original constructor.
- Create a XXXDog object called dog2 and sets its name and age to your preference by calling any of the overloaded constructors.
- Print out the name and age of and
- Change dog I\'s name to \"Lulu\" and set dog I\'s age to 4 (call getter and setter methods) and print out the new name and age for dog 1 .
- Change dog2\"s name to \"summer\" and change the dog2\'s age to 5 and print out the new name and age in person year
Posted Date: