Design a class named Month. The class should have the following private members:
- months– a string of array object that holds the name of a month, such as "January," "February," etc. (2 points)
- grossAmount– an array of double variable that holds the total amount of each month. (2 points)
- Structure of Branch that includes:
- branchName shows a name of the branch. (2 points)
- branchID shows the branch number. (2 points)
- branchManager shows branch manger name. (2 points)
You will need to build and provide the following member functions:
- A default constructor that has no arguments and sets all grossAmount to 0.0 to all 12 months (20 points)
- A constructor that accepts the name of a month as an argument. It should Search for the name of the month set grossAmount of argument month to 0.0 value. (30 points)
- A constructor that accepts a double number of grossAmount and the month name as arguments. It should set grossAmount with value passed as the argument to the passed correct month name. (20 points)
- A constructor that accepts branch items information. (20 points)
- Appropriate set and get functions for the name of the month and grossAmount variables. (10 points)
- Appropriate set and get functions for the Branch data structure. (10 points)
- Member Function that set array of months such as:
- void initializeNames() to set the array of 12 month names: (10 points) // Initialize the array of month names.
months[0] = "January"; months[1] = "February"; months[2] = "March";
months[3] = "April"; months[4] = "May"; months[5] = "June";
months[6] = "July"; months[7] = "August"; months[8] = "September";
months[9] = "October"; months[10] = "November"; months[11] = "December";
- void initializeNames() to set the array of 12 month names: (10 points) // Initialize the array of month names.
- Function that return the total groosAmount for all 12 months. (20 points)
- Using Month class the main function shows:
- How to call ALL different constructors, set and get data of the different instance of objects . (20 points)
- Crate an array of objects from class Month with size of 5. (20 points)
- Create a function that Sort an array of objects base on total groosAmount on descending order (30 points)
- Create a Menu function for user selection to do a Loop for the following: (30 points)
- select (1) to input 5 data for the array object of class month
- select (2) to display the sort of data objects base on total groosAmount
- Select (3) to exist
Demonstrate the class in a program.
{Reminder – think through the design – like from where could I assign the month name from? Create functions for repetitive tasks. Place all class definitions in the header file for the class. Utilize a class implementation file for those files that cannot appropriately live in the class header file (e.g., everything except the getters in this example). Utilize main to test your class.}
Is this the question you were looking for? Place your Order Here