use java zyBooks My library COMP 2150 home > 103 Overriding member methods zyBoo
ID: 3747134 • Letter: U
Question
use java
zyBooks My library COMP 2150 home > 103 Overriding member methods zyBooks catalog @ HeipFAQ Define a method printAll) for class PetData that prints output as follows Hint Make use of the base class printAI0) method Name: Fluffy, Age: 5, ID: 4444 1 Code from file AnimalData.java 2public class AnimalData ( private int ageYears 4 private String fuliName ; 4 private String fullName 6public void setName(String givenNane) f fullNane givenName; 10public void setage(int nunYears) ( ageYearsuVears; 12 13 14 Other parts onitted 15 16 pubiic void printAlo 17 18 19 System.out.print( Nione: st fulINane) Syston.out-printc Age ageYears); RunExplanation / Answer
public void printAll() {
super.printAll();
System.out.println(", ID: " + idNum)
}
===========================================
Thanks, PLEASE UPVOTE if helpful. Let me know if there is any concern.
Comment and I will respond.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.