Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

C++ image text in transcribed
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

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_2

Step: 3

blur-text-image_3

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

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions

Question

=+How does this metric connect to my objectives?

Answered: 1 week ago

Question

=+C&B (especially taxation) laws, regulations, and practices?

Answered: 1 week ago

Question

=+designing international assignment C&B packages.

Answered: 1 week ago