Question: Write the inputPatients ( ) method in the Appointments class. Within inputPatients ( ) , use scnr to read pairs of inputs, string currName and

Write the inputPatients() method in the Appointments class. Within inputPatients(), use scnr to read pairs of inputs, string currName and integer currAge, until "stop" is read from input. Create each Patient object with currName and currAge as arguments and append each object to ArrayList patientList.
Ex: If the input is Cam 60 Zoe 15 Ron 35 Meg 90 stop, then the output is:
Patient: Cam, Age: 60 Patient: Zoe, Age: 15 Patient: Ron, Age: 35 Patient: Meg, Age: 90
Ex: If the input is 90 Fisheries 15 Agriculture 80 Environment -999, then the output is:
Recording duration: 90, Topic: Fisheries Recording duration: 15, Topic: Agriculture Recording duration: 80, Topic: Environment

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 Programming Questions!