Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Weather monitoring station needs from you as a C++ Programmer to develop a system that can perform the following tasks in order to help

The Weather monitoring station needs from you as a C++ Programmer to develop a system that can perform the following tasks in order to help them in their study.

Task 1: The system should store the temperatures of one year per month in Celsius.

Task 2: The system should convert the temperatures from Celsius to Fahrenheit.

Task 3: The system should display a list of the temperatures converted from Celsius to Fahrenheit.

Task 4: The system should produce the average of the temperatures in that year.

Task 5: The system should produce the heights temperature in the same year.

Solve the following questions in order to perform the above given tasks:

a) Define an array of structure to store Month name and the temperature.

You are provided with the following details:

Month name: January , February, March, April, May, June, July, August, September, October, November and December .

temperature = [18 C,14 C,16 C,20 C,12 C,10 C,18 C,22 C,26 C,28 C,30 C,25 C ].

Note: Respectively (ie. January temperature 18 C , February temperature 14 C and so on)

b) Give a structure name / structure tag along with respective members as Mention in the above details.

c) Give a proper name to the Structure Array Variable.

d) Dynamically create the array of structures of a suitable size to store the Months names and their temperature data of the structure.

e) Convert all the temperature from Celsius to Fahrenheit by Creating a parameterized macro using the formula: Fahrenheit = (Celsius 1.8) +32

f) Display the elements of the array you have created dynamically, using only pointers.

g) Display a list as month name, temperature in Celsius and temperature in Fahrenheit.

h) Display the month name with the lowest temperature.

i) Display the month name with the highest temperature.

j) Find and print the average amount of temperature.

k) Destroy the memory you have dynamically allocated for the array at the end.

Note:

Solve this problem using a dynamic array with a structure.

The program should produce a suitable output that will display all the above requirements.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Did you write a special beginning that makes the reader want more?

Answered: 1 week ago

Question

Identify the elements that make up the employee reward package.

Answered: 1 week ago

Question

Understand the purpose, value and drawbacks of the interview.

Answered: 1 week ago