subject

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.
Ex. If the input is:
Dobby
2
Kreacher
3
German
Schnauzer
the output is:
Pet Information:
Name: Dobby
Age: 2
Pet Information:
Name: Kreacher
Age: 3
Breed: German Schnauzer

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 16:00
Kenny works with an it company. his company is about to launch new software in the market. he has to ensure that this new software is functional and meets all of the quality standards set up at the planning stage. which job profile is kenny likely to have? kenny is likely to have the job profile of a blank .
Answers: 2
question
Computers and Technology, 25.06.2019 03:30
All nate specialties are offered at two levels, a. journeyman and master. b. installation and service. c. apprentice and journeyman. d. heating and air conditioning.
Answers: 1
question
Computers and Technology, 25.06.2019 08:40
Anyone took cgs 1060 and took exam for simnet, slide 50 question on 1st exam.
Answers: 3
question
Computers and Technology, 25.06.2019 10:40
If you're using the paintbrush tool and want to change the color of the paint being used what should you change
Answers: 1
You know the right answer?
The base class Pet has private fields petName, and petAge. The derived class Dog extends the Pet cla...
Questions
question
Social Studies, 08.10.2020 05:01
Questions on the website: 13722365