Question: Write the inputParticipants ( ) method in the Clinic class. Within inputParticipants ( ) , use scnr to read each line number until - 9

Write the inputParticipants() method in the Clinic class. Within inputParticipants(), use scnr to read each line number until -999 is read from input. If the line number is not equal to -999:
Create a new Participant object.
Use the Participant object's readDetails() method to read the participant's age and name from input.
Append the Participant object to ArrayList participantList.
Ex: If the input is:
120 Pat 255 Guy 335 Meg 480 Ava -999
then the output is:
Participant age: 20, Name: Pat Participant age: 55, Name: Guy Participant age: 35, Name: Meg Participant age: 80, Name: Ava

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!