Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I want accurate java code with output screenshot please I'll upvote Employee Class: The Employee class extends the Person class and has instance variable hireDate
I want accurate java code with output screenshot please I'll upvote
Employee Class: The Employee class extends the Person class and has instance variable hireDate (since it will hold the hiring date of an employee so use Date class). This class will have following three constructors 1. No argument constructor 2. An argument constructor that receives name and hireDate. 3. An argument constructor that receives Employee object. Define the constructors, mutator and accessor methods, and suitably define toString and equals methods. SalariedEmployee Class; The SalariedEmployee class extends the Employee class and has instance variable salary. The class. will have the following three constructors: 1. No argument constructor 2. An argument constructor that receives name, hireDate and Salary. 3. An argument constructor that receives SalariedEmployee object. Define the constructors, mutator and accessor methods, and suitably define toString and equals methods. Doctor Class: Give the definition of a class named Doctor whose objects are records for a clinic's doctors. This class will be a derived class of the class SalariedEmployee. A Doctor recond has the doctor's specialty (such as "Pediatrician", "Obstetrician", "General Practitioner", and so forth; so, use the type String) and office visit fee (use type double). Be sure your class has a reasonable complement of constructors, accessor, and mutator methods, and suitably defined equals and tostring methods. Patient Class: Give the definition of class Patient whose objects are records for a clinic. Patient will be derived from the class Person. A Patient record has the patient's name (inherited from the class Person) and primary physician of type Doctor. Be sure your class has a reasonable complement of constructors, accessor and mutator methods, and suitably defined equals and tostring methods. Billing Class: Give the definition of class Billing whose objects are records for a clinic. A Billing object will contain a Patient object, a Doctor object, and an amount due of type double. Be sure your class has a reasonable complement of constructors, accessor and mutator methods, and suitably defined equals and toString methods. Main Class Write a test program that creates at least three patients, at least three doctors, and at least three Billing records, and then prints out the patients, doctors and billing information. At the end print out the total income from the Billing records. Sample Output The sample output of the main program is depicted in the below picture.Task: Create the following classes: Person Class: Create a class called Person with definition as follows. Completing the definitions of the methods is part of this programming assignment. public class Person( private String name; public Person () ( ...) public Person (String name) public Person (Person object) { ...) public String getName () public String setName (String name) public String toString () (...) public boolean equals (Person other) ( ...)The doctor Bob was hired on Wed Dec 31 19:00:12 EST 1969 at Salary 34000.0. The speciality is Pediatrist and visit fee is $10.5. The doctor Susan was hired on Wed Dec 31 19:04:14 EST 1969 at Salary 450600.0. The speciality is Surgeon and visit fee is $150.5. The doctor Lilly was hired on Wed Dec 31 19:04:14 EST 1969 at Salary 290600.0. The speciality is Kidney and visit fee is $95.5. "Patient's Information* The name is: Fred, Primary doctor is: Bob The name is: Sally, Primary doctor is: Susan The name is: John, Primary doctor is: Lilly "Billings's Information" Patient: Fred Doctor: Bob Amount Due: $21.0 Patient: Sally Doctor: Susan Amount Due: $150.5 Patient: John Doctor: Lilly Amount Due: $170.0 The total income from billing records is: 341.5Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started