Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

11.11: Customer Accounts A student has established the following monthly budget: 500.00 Housing 150.00 Utilities 65.00 Household 50.00 Expenses 50.00 Transportation 250.00 Food 30.00 Medical

11.11: Customer Accounts A student has established the following monthly budget: 500.00 Housing 150.00 Utilities 65.00 Household 50.00 Expenses 50.00 Transportation 250.00 Food 30.00 Medical 100.00 Insurance 150.00 Entertainment 75.00 Clothing 50.00 Miscellaneous

Write a program that has a MonthlyBudget structure designed to hold each of these expense categories. The program should pass the structure to a function that asks the user to enter the amounts spent in each budget category during a month. The program should then pass the structure to a function that displays a report indicating the amount over or under in each category, as well as the amount over or under for the entire monthly budget.

NOTES: For each of the categories listed above, and in that order, the program prompts the user for the the amount spent on X: where X is a category from the above list (e.g. "Insurance").

Using the values read into the structure, the program generates a table with a heading and in each row there are four items: the category (e.g. "Housing"), followed by the value budgeted for the category (500.00 in the case of Housing), followed by the value that had been read in for that category, followed by the amount that the actual spent was over or under the category budget.

Finally, after the table, is an indication of whether the student is over or under budget.

Input Validation. None.

this should be the output.

image text in transcribed

instead of: Enter the amount spent on housing: Enter the amount spent on utilities: Enter the amount spent on household expenses: Enter the amount spent on transportation: Enter the amount spent on food: Enter the amount spent on medical expenses: Enter the amount spent on insurance: Enter the amount spent n entertainment: Enter the amount spent on clothing: Enter the amount spent on miscellaneous xpenses: Category Budgeted Spent Over(-)/Under Housing 500.00 500.00 0.00 Utilities 150.00 150.00 0.00 Household 65.00 65.00 0.00 Transportation 50.00 50.00 0.00 Food 250.00 250.00 0.00 Medical 30.00 30.00 0.00

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

Advances In Databases And Information Systems 14th East European Conference Adbis 2010 Novi Sad Serbia September 2010 Proceedings Lncs 6295

Authors: Barbara Catania ,Mirjana Ivanovic ,Bernhard Thalheim

2010th Edition

3642155758, 978-3642155758

More Books

Students also viewed these Databases questions