Question
Write a program that uses a table of 12 Month object (Month[] ClimaticYear = new Month[12]) to save the climate information of a year. Each
Write a program that uses a table of 12 Month object (Month[] ClimaticYear = new Month[12]) to save the climate information of a year. Each Month object must contain the following information: 1. Maximum monthly temperature (TmMax = 30 0C) 2. Minimum monthly temperature (TmMin >= -30 0C) 3. Average Monthly Temperature (TmMoy=(max+min)/2) 4. Total monthly precipitation ( 0 mm = PmTot = 200 mm ) Upon its execution, your program will have to ask the user to provide for each month, TmMax, TmMin and PmTot (Month m = new Month(TmMax, TmMin, PmTot)). TmMoy will be calculated from the other information. Each Month must then be saved in the ClimaticYear table, making sure not to overwrite an already existing month. Whether the 12 Months have already been registered or not, your program must at all times be able to display the following information: 1. Total Annual Precipitation 2. Annual Precipitation Average 3. Annual Temperature Max and the month(s) associated with that temperature 4. Annual Temperature Min and the month(s) associated with that temperature.
draw the class diagram with relationship dependency, association, aggregation, composition , inheritance and interface
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