Question: Use scnr to read integer entryNumber from input until the next entryNumber read is equal to - 9 9 . If entryNumber is not equal
Use scnr to read integer entryNumber from input until the next entryNumber read is equal to If entryNumber is not equal to :
Assign currCity with a new City object.
Use currCity's readDetails method to read the city's population and name from input.
Append currCity to ArrayList cityList.
Ex: If the input is:
Hanna Davids Yonder Barge
then the output is:
City population: Name: Hanna City population: Name: Davids City population: Name: Yonder City population: Name: Barge
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
