Question: C++ 5. Write a class, and a simple program to test It, according to the following specifications: (52 pts) a. Your class has 3 member
5. Write a class, and a simple program to test It, according to the following specifications: (52 pts) a. Your class has 3 member data: an integer pointer that will be used to create a dynamic variable to store the number of days in a month, a double pointer that will be used to create a dynamic array to stores the number of inches of rain for each day of the month, and a double pointer that will be used to create a dynamic array to stores the number of inches of snow for each day of the month. b. Your class has the following member functions i. a constructor with an int parameter representing the number of days in a month; the constructor creates the dynamic variable that stores the number of days and sets it to the int parameter and creates the two dynamic arrays for the rain and the snow. ii. a destructor. v. a function which reads in the amount of rain and snow for each day of the month vi. a function that calculates and prints the average daily rainfall and the average daily snowfall. vii, a function that returns the number of days it did not rain or snow - the "dry days of the month
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
