Question
Develop a Java Program Define JAVA a class called PastVisits that contains the following fields: DateVisited: a string of 10 characters in form of dd/mm/yyyy
Develop a Java Program
Define JAVA a class called PastVisits that contains the following fields:
DateVisited: a string of 10 characters in form of dd/mm/yyyy
MedicinePrescribed: a string of 100 characters Symptoms: a string of 100 characters
Define a dynamic Queue called PatientRecords which is capable of holding the following information:
Name: a string of up to 30 characters
Visits: an integer recording the numbers of visits to the clinic
PastVisitsInfo: array that can store 100 of the above PastVistits class
NextPatient: a pointer pointing to the next PatientRec class
Define a class called PatientsQueue which stores the following:
NumOfPatient: an integer recording the number of patients in the queue
FirstInQueue: an address pointing to the first PatientRec class
LastInQueue: an address pointing to the last PatientRec class
a) The doctor wishes to know the name of the next patient to visit him. Write a function called DisplayFirstPatient() that takes in a parameter which points to a PatientQueue and prints out the name of the patient at the head of the queue. The function header is given as: void DisplayFirstPatient(struct PatientsQueue* PatientsToday)
b) The nurse wishes to know the Patients names in the queue who visited the clinic on a certain date. Write a function called FindPatients() which takes in a parameter which points to PatientQueue and a second parameter RequiredDate which is a string of 10 characters. The function should print out the names of all patients in the queue on that date. The function header is given as:
void FindPatients(struct PatientsQueue* PatientsToday, char RequiredDate[10])
Step 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