Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Visual Basic Net Database Programming

Authors: Rod Stephens

1st Edition

0789726815, 978-0789726810

More Books

Students also viewed these Databases questions