Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Budget Analysis Write this program so that the monthly budget and the indefinite list of expenses is input from a data file. Program Specifications

C++ Budget Analysis

Write this program so that the monthly budget and the indefinite list of expenses is input from a data file.

Program Specifications that must be followed:

Data is input from a file.

The list of expenses data is stored in parallel arrays (or vectors).

The expenses data includes the descriptive label (e.g., Car payment) and the expense amount (e.g., 309).

The months budget amount is displayed.

The input expenses data is output in a tabular format showing the list of expense labels and amounts.

The sum of the expenses is computed and output.

An appropriate comment is displayed comparing the month's expenses to the budget.

The largest and smallest budgeted expense are displayed.

It's suppose to run this information

image text in transcribed

Input file should be setup like named expenses

January 2017 1855 Car payment 309

Rent 652 Insurance 200 Supermarkets, food 500 Restaurants 150 Internet service 56 Cell phone 109 Gasoline 175

1. First test case Budget for the month of January 2017 1616.00 Expenses Amounts 309.00 ar payment 652.00 Rent Insurance 200.00 Supermarkets food 500.00 150.00 Restaurants Internet service 56.00 109.00 Cell phone 175.00 Gasoline $2151.00 Sum of expenses: Careful, you've exceeded your budget by $535.00 dollars. Largest budgeted item: $652.00 for Rent Smallest budgeted item: $56.00 for Internet service 2 Second test case Budget for the month of March 2017 $1616.00 Expenses Amounts 590.00 Rent 200.00 Insurance 450.00 Supermarkets food 100.00 Restaurants Internet service 47.00 Cell phone 32.00 Gasoline 175.00 Sum of expenses 1594.00 Good, you have budgeted $22.00 more dollars than you spent. Largest budgeted item: $590.00 for Rent Smallest budgeted item: $32.00 for Cell phone 1. First test case Budget for the month of January 2017 1616.00 Expenses Amounts 309.00 ar payment 652.00 Rent Insurance 200.00 Supermarkets food 500.00 150.00 Restaurants Internet service 56.00 109.00 Cell phone 175.00 Gasoline $2151.00 Sum of expenses: Careful, you've exceeded your budget by $535.00 dollars. Largest budgeted item: $652.00 for Rent Smallest budgeted item: $56.00 for Internet service 2 Second test case Budget for the month of March 2017 $1616.00 Expenses Amounts 590.00 Rent 200.00 Insurance 450.00 Supermarkets food 100.00 Restaurants Internet service 47.00 Cell phone 32.00 Gasoline 175.00 Sum of expenses 1594.00 Good, you have budgeted $22.00 more dollars than you spent. Largest budgeted item: $590.00 for Rent Smallest budgeted item: $32.00 for Cell phone

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

Data Management Databases And Organizations

Authors: Richard T. Watson

6th Edition

1943153035, 978-1943153039

More Books

Students also viewed these Databases questions

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago