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

Write the inputParticipants() method in the Clinic class. Within inputParticipants(), use scnr to read each row number until -1 is read from input. If the row number is not equal to -1:
Create a new Participant object.
Use the Participant object's readNameAndGroup() method to read the participant's name and group from input.
Append the Participant object to ArrayList participantList.
Ex: If the input is:
1 Pat A 2 Ana B 3 Gus B 4 Guy A -1
then the output is:
Participant: Pat, Group: A Participant: Ana, Group: B Participant: Gus, Group: B Participant: Guy, Group: A
Ex: If the input is D CO A GA C UT B IA !, then the output is:
License group: D, State: CO License group: A, State: GA License group: C, State: UT License group: B, State: IA

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!