Question: Repeat the following until currCity's readNameAndPopulation ( ) method returns false: Assign currCity with a new City object. Use currCity's readNameAndPopulation ( ) method to
Repeat the following until currCity's readNameAndPopulation method returns false:
Assign currCity with a new City object.
Use currCity's readNameAndPopulation method to read each pair of inputs, string name and integer population.
If currCity's readNameAndPopulation method returns true, append currCity to ArrayList cityList.
Ex: If the input is Bow Adomstown Jackson Sundance end, then the output is:
City: Bow, Population: City: Adomstown, Population: City: Jackson, Population: City: Sundance, Population:
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
