Question
Solve using java Create 3 arrays as described below: A String array to hold the names of the cities: Las Vegas, Minsk, and Sao Paulo
Solve using java
Create 3 arrays as described below:
-
A String array to hold the names of the cities: Las Vegas, Minsk, and Sao Paulo
-
An int array that holds the average yearly high temperatures of each city in Fahrenheit: -Las Vegas: 104 degrees -Minsk: 73 -Sao Paulo: 80
-
A double array that holds the average yearly precipitation for each city in inches: -Las Vegas: 4.17 inches -Minsk: 26.7 -Sao Paulo: 55.0
Make sure you keep the array elements in the same order so that the same index can be used to get corresponding cities, temps, and precipitation. These are called parallel arrays. Then print out a table that displays each city with its corresponding average high temp and annual precipitation. Your output should match mine below!
Las Vegas has an average annual precipitation of 4.17 inches.
Las Vegas has an average annual high temp of 104 degrees Fahrenheit.
Minsk has an average annual precipitation of 26.7 inches.
Minsk has an average annual high temp of 73 degrees Fahrenheit.
Sao Paulo has an average annual precipitation of 55.0 inches.
Sao Paulo has an average annual high temp of 80 degrees Fahrenheit.
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