Question: For this assignment you are expected to submit the following two files: 1. hh. h 2. hh. Computer Information Systems CSC 211: Advanced Programming Technique

For this assignment you are expected to submit the following two files:
1. hh. h
2. hh.
Computer Information Systems CSC 211: Advanced Programming Technique
You are being asked to write a class for simple weather data storage. Each instance of the class will hold data for exactly one month (30 days). Each days weather will be classified as either rainy (R), cloudy (C), or sunny (S). To achieve this, your class will contain a character array of length 30. The class will provide three functions to return the number of rainy, cloudy, and sunny days in that month.
Name your class "MonthlyWeatherData"; separate declaration from implementation (i.e. Header and CPP files). The class has the following members:
1. monthName, a private member of type string
2. arrMonth, a private member array of type char of size 30.
3. Nondefault constructor which receives two parameters, a string and a char array. The constructor will copy the arrays content from the parameter array to the member variable arrMonth.
4. destructor. Leave the destructor empty.
5. getMonthName, returns the value of the variable monthName
6. numberOfRainyDays, this method returns the number of days in the month designated with the letter R
7. numberOfSunnyDays, this method returns the number of days in the month designated with the letter S
8. numberOfCloudyDays, this method returns the number of days in the month designated with the letter C
9. toVector, this method returns a copy of the array arrMonth in the form of a vector pointer. The methods return
type is vector

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!