Answer :
courseStudent.setName("Smith"); courseStudent.setAge(20); courseStudent.setID(9999); courseStudent.printAll(); "Id:" + courseStudent.getID(); System.out.print.
In order to print the output as specified in the question, this portion of the code must be included. The main method, where the solution is requested, should include these lines.
The issue's Java code is provided below and is fully functional. Code taken from PersonData.java: / =====
PersonData is a public class.
ageYears, private int
lastName, a private string.
UserName: public void setName(String)
userName = lastName;
return;
}setAge(int numYears, public void)
numYears ageYears;
return;
}/ Omitted are other pieces
printAll() in public void
"Name:" + lastname; System.out.print;
Age: ageYears + System.out.print(" Age: ");
return;
}
/ ===== end =====
/ ===== Code from studentdata.java
a common class PersonData is expanded by StudentData
idNum: private int;
setID(int studentId), public void
studentId = idNum;
return;
}
getID() for public int
deliver idNum;
}
/ ===== end =====
StudentDerivationFromPerson.java / ===== Code =====
Know more about Java here:
https://brainly.com/question/12978370
#SPJ4