Question: Write the inputTowns ( ) method in the SmallCities class. Within inputTowns ( ) , use scnr to read each row number until - 1
Write the inputTowns method in the SmallCities class. Within inputTowns use scnr to read each row number until is read from input. If the row number is not equal to :
Create a new Town object.
Use the Town object's readNameAndRating method to read the town's name and rating from input.
Append the Town object to ArrayList townList.
Ex: If the input is:
Gillette A Hanna A Goshen B
then the output is:
Town: Gillette, Rating: A Town: Hanna, Rating: A Town: Goshen, Rating: B
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
