Question: Demo Problem: Write a program that stores the following data about expense categories for a student s budget: category name, the amount allocated to it
Demo Problem: Write a program that stores the following data about expense categories for a students budget: category name, the amount allocated to it and the amount spent. The program should:
Initialize the name and allocated amount for each category.
Ask the user to enter the amount spent for each category.
Show a table listing each categorys name, amount allocated, amount spent, and overunder amount.
Display the total amount over or under budget.
Problem specifications: Assume that these are the names of the categories and the allocated amounts:
Housing $
Transportation $
Food $
Entertainment $
Clothing $
Other $
Sample output:
How much was spent on Housing
How much was spent on Transportation
How much was spent on Food
How much was spent on Entertainment
How much was spent on Clothing
How much was spent on Other
Categories: Budget: Spent: OverUnder
Housing
Transportation
Food
Entertainment
Clothing
Other
The total money spent is $ under the budget.
if the total spent is the total budget, this line should report the amount over the budget.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
