Question
File: HW2_Cities.java Implement the program discussed in class (on paper) on Monday, Feb 3. See the Daily webpage for the scan of what was written
File: HW2_Cities.java Implement the program discussed in class (on paper) on Monday, Feb 3. See the Daily webpage for the scan of what was written in class and watch the Lecture video from that day if needed. You can get however much help on this task or work together with another classmate. But this (collaboration and extra help allowed) applies only to this task, not the other tasks of this and future homeworks. Use nextLine() to be able to read cities with 2 words in their name, but place another nextLine() after reading the number for the area to get rid of the new line left over from reading with any of nextDouble() or nextFloat().
---------Sample run 1: Enter city1: New York Enter area1: 302.6 Enter city2: Arlington Enter area2: 99.69 Enter city3: Dallas Enter area3: 385.8 ------------------------------ |City | Area| ------------------------------ |New York | 302.60| ------------------------------ |Arlington | 99.69| ------------------------------ |Dallas | 385.80| ------------------------------ -------- Sample run 2: Enter city1: New York Enter area1: 302.6 Enter city2: Arlington Enter area2: 99.69 Enter city3: Dallas Enter area3: 385.8 ------------------------------ |City | Area| ------------------------------ |New York | 302.60| ------------------------------ |Arlington | 99.69| ------------------------------ |Dallas | 385.80| ------------------------------
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started