Question: please rewrite the program 2. getBudget: Function consisting of an input parameter by reference that receives a variable of the type pointer representing the amount

please rewrite the program
please rewrite the program 2. getBudget: Function consisting of an input parameter

2. getBudget: Function consisting of an input parameter by reference that receives a variable of the type pointer representing the amount allocated for expenses incurred during a month.

3. getNumberOfExpenses: Function that consists of an input parameter by reference that receives a variable of type pointer that represents the amount of expenses incurred during a month.

4. getDescriptionExpenses: Function that consists of three input parameters, one of them is a two- dimensional array of character type that will store the descriptions of each of the expenses and a pointer to a numerical array that stores each of the expenses. The third parameter of the pointer type stores the address of the amount of expenses incurred in the month. The purpose of the function is to ask the user in parallel format for the related information of each of the cats.

5. getTotal: Function consisting of three input parameters, one of which is a pointer to a numeric array that stores each of the expenses. The second parameter of the pointer type stores the address of the amount of expenses incurred in the month. The third parameter returns by reference the total sum of the expenses.

6. getLowestExpenses: Function consisting of two input parameters a pointer to a numeric array that stores each of the expenses The second parameter of type pointer stores the address of the amount of expenses incurred in the month. The purpose of the function is to return the index where the lowest expense is found.

7. getHighthestExpenses: Function consisting of two input parameters, a pointer to a numeric array that stores each of the expenses. The second parameter of the pointer type stores the address of the amount of expenses incurred in the month. The purpose of the function is to return the index where the highest expense is found.

8. Display: Function that consists of 3 input parameters, the two- dimensional array that contains the descriptions of each expense, the pointer of the first address of the expense array, the pointers where it stores the addresses of the variables that store the amount of the costs. The functions that calculate the total and the indices of the largest and smallest are called inside the function. The function prints if the person exceeds the amount assigned for the month or if at the end of the month and reporting his expenses he has money left over. The major and minor expense incurred indicating the description and its amount.

9. Implement a program that calls the above functions.

10. Use pointer notation in the manipulation of the numeric array

using nanospace std; Eint main() int budget, expense; int sun of expense =; cout ce "Enter the anount you have budgoted for the month: "; cin > budget; cin budget; while (1) cout "please enter your expense, enter to exit: "; cin expense; if (expense = ) brealt; else sum_of_expense = sun_of_expense + expense; if (sun_of_expense > budget) cout "You are overbudget by anount: " \& sum_of_expense - budget; 1 else } cout s "You are underbudget by anount; " \& budget-sum_of_oxpense; 1

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!