Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed

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

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

Step: 3

blur-text-image

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

Microsoft Visual Basic 2005 For Windows Mobile Web Office And Database Applications Comprehensive

Authors: Gary B. Shelly, Thomas J. Cashman, Corinne Hoisington

1st Edition

0619254823, 978-0619254827

More Books

Students also viewed these Databases questions

Question

2. Develop a persuasive topic and thesis

Answered: 1 week ago

Question

1. Define the goals of persuasive speaking

Answered: 1 week ago