sample run

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Please mention what sample run

11.11: Customer Accounts
Lab
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.
Transcribed Image Text:11.11: Customer Accounts Lab 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.
SAMPLE RUN #1: . /ETest
Interactive Session
Hide Invisibles
Highlight: None
Show Highlighted Only
Enter•the•amount•spent•on•housing:•500-
Enter·the•amount•spent•on•utilities:•150-
Enter•the•amount•spent•on•household•expenses:•65e
Enter•the•amount•spent•on•transportation::50e
Enter·the•amount•spent•on•food::250+
Enter·the•amount•spent•on•medical·expenses:•30-
Enter·the•amount•spent•on•insurance:•100+
Enter·the•amount•spent•on•entertainment::150+
Enter•the•amount•spent•on•clothing:•75-
Enter·the•amount•spent•on•miscellaneous•expenses: •49.99-
Category
•Budgeted•………•Spent•••Over(-)/Under-
---
500.00• ..•500.00•
Housing.
Utilities•
• • 0.00+
• •0.00
•• •0.00+
•150.00••••150.00•
Household
• 65.00• ••.•65.00•
Transportation
•50.00•••••50.00•
0.00-
• 250.00••.•250.00•
• 30.00••..•30.00•
Food•.
•0.00+
Medical·•
••0.00+
Insurance:
100.00••••100.00•
• • • 0.00+
Entertainment
150.00••••150.00•
0.00-
Clothing•••.
• 75.00• ••.•75.00• •.
••50.00• ••.•49.99•
0.00-
Miscellanous
•0.01-
For•the•month•you•are•under•budget•by•$0.01-
Transcribed Image Text:SAMPLE RUN #1: . /ETest Interactive Session Hide Invisibles Highlight: None Show Highlighted Only Enter•the•amount•spent•on•housing:•500- Enter·the•amount•spent•on•utilities:•150- Enter•the•amount•spent•on•household•expenses:•65e Enter•the•amount•spent•on•transportation::50e Enter·the•amount•spent•on•food::250+ Enter·the•amount•spent•on•medical·expenses:•30- Enter·the•amount•spent•on•insurance:•100+ Enter·the•amount•spent•on•entertainment::150+ Enter•the•amount•spent•on•clothing:•75- Enter·the•amount•spent•on•miscellaneous•expenses: •49.99- Category •Budgeted•………•Spent•••Over(-)/Under- --- 500.00• ..•500.00• Housing. Utilities• • • 0.00+ • •0.00 •• •0.00+ •150.00••••150.00• Household • 65.00• ••.•65.00• Transportation •50.00•••••50.00• 0.00- • 250.00••.•250.00• • 30.00••..•30.00• Food•. •0.00+ Medical·• ••0.00+ Insurance: 100.00••••100.00• • • • 0.00+ Entertainment 150.00••••150.00• 0.00- Clothing•••. • 75.00• ••.•75.00• •. ••50.00• ••.•49.99• 0.00- Miscellanous •0.01- For•the•month•you•are•under•budget•by•$0.01-
Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Web Page
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education