The base class Pet has private fields petName, and petAge. The derived class Dog extends the Pet class and includes a private field for dogBreed. Complete main() to: create a generic pet and print information using printInfo(). create a Dog pet, use printInfo() to print information, and add a statement to print the dog's breed using the getBreed() method.

Respuesta :

Answer:

Hello attached is the Java program written to solve the problem

The Pet.java and Dog.java files are unaltered

Explanation:

The input and output  codes are attached as well i.e the second image is the input while the third image is the output code

Ver imagen batolisis
Ver imagen batolisis
Ver imagen batolisis