Question: PLEASE HELP ME WITH THE VISIT CLASS PLEASE! This program represents a simple medical administration system, which could hypothetically be used by a medical center

PLEASE HELP ME WITH THE VISIT CLASS PLEASE!

This program represents a simple medical administration system, which could hypothetically be used by a medical center to maintain information on their patients, doctors, patient visits, medical procedures performed, etc.

The system will be developed in several phases. This document describes the functionality to be implemented for phase 1.

For phase 1, we are just going to implement several classes, but we are not going to implement a user interface. I am providing you with code for the MedAdministration_Phase1 class, which is the class that has the main method.

Important: All the classes that you implement are to provide a constructor with enough parameters to initialize all instance variables and, unless specified, all classes also have to provide a copy constructor. Additionally, all classes need to provide a getter and a setter method for every instance variable, as well as the toString, equals, and hashCode methods.

The toString method in each class returns a String with the value of all the instance variables including labels.

The equals method compares two objects of the same type: the calling object and the one passed as an argument. It has one parameter whose data type is Object and it returns true if the argument is an object of the same type and has the same value for all fields as the calling object. Otherwise, it returns false.

The hashCode method returns a hashcode for the calling object based on its field values. You may let your IDE generate this method, but make sure that the fields used in the hash code calculation are the same fields used in the comparison of the equals method.

Include javadoc comments for all the classes, constructors and methods in the project.

When getting or setting an instance variable that is a reference type, other than String, make sure to make a copy of the object.

Visit This class represents a patients visit to the medical center.

Private Instance Variables:

attendingPhysician of type Doctor

patient of type Patient

listOfDiagnoses of type ArrayList

listOfProcedures of type ArrayList

visitDate of type String

Public Instance Methods:

addDiagnosis This method doesnt return a value and it has 1 parameter of type Diagnosis. It adds a copy of the parameter to the listOfDiagnoses instance variable.

addVisit This method doesnt return a value and it has 1 parameter of type Visit. It adds a copy of the parameter to the listOfVisits instance variable.

Notes:

  • Exclude the listOfDiagnoses and listOfProcedures fields from the comparison in the equals method.

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!