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

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

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!