Question: The solution is in the program bluej : Q1. Create a class named Teacher with the fields: TeacherName, TeacherID, Age and MobileNo, Address, Department, (data
The solution is in the program bluej :
Q1. Create a class named Teacher with the fields: TeacherName, TeacherID, Age and MobileNo, Address, Department, (data types are String and int)
Q2. Declare an empty and a parameterized Constructor for the above class(Teacher) and set the TeacherName and TeacherID
Q4. Declare an Accessor method PrintTeacher() in class Teacher to display the student details. Declare a Mutator method UpdateAge() to increase the Age of a teacher by 2 years and print the updated Age.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
