Question: 1. Write a class called Budget with the data members accountNo (int), name (string) and months (a static float array of size 6). Provide the

1. Write a class called Budget with the data members accountNo (int), name (string) and months (a static float array of size 6). Provide the following functions. [4 points for the class structure, and 5 points per function] a) default constructor. Use an initialization list. You can set the default values as you'd like but leave the parameter empty for months (This will set all elements to zero). b) getName(). Returns the name. c) change(int index, float val). Sets the element at the index in months to val. d) print(). Prints all the values in months separated by a space. You do NOT have to provide any other function (e.g., copy constructor or copy assignment). It should support calls such as: Budget b; cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
