Menu

[solved]-Want Keep Data Patient Prescriptions Data Used Project Follows Patient Patient Id First Na Q39055547

we want to keep some data about a patient and his/herprescriptions.

The data to be used in this project is as follows:

Patient –

Patient ID, First Name, Last Name, Email

Prescription –

Prescription ID, medicine name, price

Note: A patient would have more than one prescription, so use anarray of prescriptions

The program would allow creating new patient objects, and alsoallow adding prescription information.

Your program should allow printing the patient and prescriptioninformation as follows:

Patient ID and name

Email Address

List of prescriptions (Prescription ID, medicine name andprice)

Total cost of prescriptions

Requirement: Each class would have at least one constructor,accessor and mutator methods for each variable, and toString()methods. You can have additional methods as needed.

TEST example:

Patient pat1 = new Patient(1001, “bill”, “jones”,“bjones@mail.com”);

Patient pat2 = new Patient(1002, “john”, “doe”,“jdoe@mail.com”);

pat1.addPrescription(23,”med1”,45.00);

pat1.addPrescription(11,”med3”,75.00);

pat1.addPrescription(61,”med5”,25.00);

pat2.addPrescription(101,”med71”,145.00);

Allow printing patient info and all his/her prescriptions(Example only):

System.out.println(pat1);

for(int i=0;i<pat1.prescriptionList.getCount; i++)

System.out.println(pat1.prescriptionlist[i]);

Expert Answer


Answer to we want to keep some data about a patient and his/her prescriptions. The data to be used in this project is as follows: … . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *