3. The base class Pet has the protected fields petName, and petAge. The derived class Cat extends the Pet class and includes a private field for catBreed.
Your Pet class should be able to:
• create a generic pet and print information of the pet using printInfo() (a method you have to create).
Your Cat class that extends Pet should be be able to:
• create a Cat pet, use printInfo() to print information, and add a statement to print the cat's breed using the getBreed() method.
For your main() method, given an input of a cat's information, output the information with the Cat class' printInfo() method.
Example input/output:
Input:
Kreacher
3
Scottish Fold
Output:
Cat Information:
Name: Kreacher
Age: 3
Breed: Scottish Fold