Question: java, I need source code and output please Programming 2. Write a class called Dog that contains instance data that represents the dog's name and

Programming 2. Write a class called Dog that contains instance data that represents the dog's name and age. Define the Dog constructor to accept and initialize instance data. Constructor Getter and setter method Method to compute and returns the age of the dog in "person years" (seven times the dog's age), toString() method Write a Driver class called Kennel, whose main method instantiates and updates several Dog objects. Objects created in the main method Dog d1 = new Dog("Spot", 4); Dog d2 = new Dog("Fluffy", 1); Dog d3 = new Dog("Killer", 7); Dog d4 = new Dog("King Tut", 3); Sample Output Dog: Spot Age: 4 Person-Years: 28 Dog: Fluffy Age: 1 Person-Years: 7 Dog: Killer Age: 7 Person-Years: 49 Dog: King Tut Age: 3 Person-Years: 21 Happy Birthday, Killer You are now 56 years old in person-years
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
