Question: Use scnr to read integer lineNumber from input until the next lineNumber read is equal to - 1 . If lineNumber is not equal to

Use scnr to read integer lineNumber from input until the next lineNumber read is equal to -1. If lineNumber is not equal to -1:
Assign currMember with a new Member object.
Use currMember's readDetails() method to read the member's name and age from input.
Append currMember to ArrayList memberList.
Ex: If the input is:
1 Jen 65
2 Tim 50
3 Cam 55
4 Bob 70
-1
then the output is:
Member: Jen, Age: 65
Member: Tim, Age: 50
Member: Cam, Age: 55
Member: Bob, Age: 70

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!