Question: Please write code for this in java and read instructions carefully. Thank you! This problem uses the Person class used in the picture. Create a

Please write code for this in java and read instructions carefully. Thank you!

This problem uses the Person class used in the picture.

Create a class Teacher whose objects are records for an after-school programs teachers. This class is an extension of the Person class. In addition to inherited attributes, a Teacher has a specialty, such as history or biology, and a teacherFee of type double. Be sure that your class has a reasonable set of constructors, so that you can construct a Teacher object in case the specialty, the fee, or both are unknown. Create a class Pupil whose objects are records for an after-school programs clients. This class is also an extension of Person. In addition to inherited attributes, a Pupil has an id number. Be sure that your class has two constructors so that you can construct a Pupil object in case a pupils id number is unknown.

Create a class Session. A Session object is to contain a reference to a Pupil object, a reference to a Teacher object and an additional attribute that refers to the date and time of an appointment between the teacher and the pupil. Write a tester that creates several Teacher objects, several Pupil objects, and several Session objects. Your tester should demonstrate that from a reference to a session you can display the data about the pupil and the teacher associated with the given session. (You can use each of your Teacher objects and each of your Pupil objects for several Session objects.)

Create a class called HelpCenter has three attributes: an array list of Teachers, an array list of Pupils, and an array list of Sessions associated with the Teachers, Pupils and Sessions.

Create a public method called getTeachersPupilsAndSessions( ) for HelpCenter. The getTeachersPupilsAndSessions( ) takes one parameter, the name of a pupil, and displays the details of the given pupil's teachers, and sessions with those teachers.

Create data and a tester that demonstrates your work.

Please write code for this in java and read instructions carefully. Thank

public class Person private String name; public Person( ) name "No name yet."; public Person (String initialName) name = initialName; public void setName (String newName) name = newName; public String getName return name public void writeOutput() System.out.println ("Name:" name): public boolean sameName (Person otherPerson) return (this.name.equalsIgnoreCase (otherPerson.name))

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!