Homework 8

1. Dog class [Savitch, Chapter 7, Problem 7, p. 509] (10 points)

Create a new class called Dog that is derived from the PetRecord class given in Display 5.19/page 351. The new class has the additional attributes of breed (type String) and boosterShot (type boolean, true if the pet has had its booster shots, false otherwise). Be sure your classes have a reasonable complement of constructors and accessor methods. Write a program that reads in five pets of type Dog from the user and prints out the name and breed of all the dogs that are over two years old and have not had their booster shots.