Question: PLEASE READ PROPERLY, I NEED TO HAVE A MAIN AND A TESTER CLASS Instructions: Write a program that displays the average temperature and the annual



PLEASE READ PROPERLY, I NEED TO HAVE A MAIN AND A TESTER CLASS
Instructions: Write a program that displays the average temperature and the annual precipitation for a selected city. The user should be able to choose whether temperature is displayed in Fahrenheit or Celsius and whether precipitation is displayed in inches or centimeters. Note: This is a two-part assignment. You will work only on the Fahrenheit and inches options in the first version. In the second part, to be completed later, you will add the Celsius and centimeter options, as well as the correct format for the output. 1. Create a new project called 06.01 Weather Data in the Mod06 Assignments folder. 2. Create an object class called CityWeatherv1 in the newly-created folder. A. Add instance variables for the months, temperature, and precipitation arrays. B. Include a constructor that accepts all three arrays as parameters. C. Include getter and setter methods for each instance variable. D. The program will calculate the average annual temperature and the total annual precipitation. You will need to create the following non-static methods: I. A method to calculate the average annual temperature II. A method to calculate the total annual precipitation 3. Create a client class called CityWeatherTesterv1 in the same folder. A. Assign the months of the year to an array. B. Data for average monthly temperature and precipitation in several Florida cities are tabulated below. Pick a city from this list and assign the values to arrays. Do not read the data in from a file. C. Create (instantiate) an object to represent a city's annual weather data for one year. D. Print out the average temperature and total precipitation to test the methods you created in CityWeatherV1. 4. When you complete this assignment, save it. You will continue making modifications to it in the next lesson. It will be turned in for a grade at that time. Expected Output: When your program runs correctly, you should see output similar to the following. Expected Output: When your program runs correctly, you should see output similar to the following
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
