Question: Using c++ Q1: Monthly Budget Program A student has established the following monthly budget: Housing; 500 Utilities; 150 Household;65 Transportion;50 Food;250 Medical;30 Insurance;100 Entertainment;150 Clothing;75

Using c++

Q1: Monthly Budget Program

A student has established the following monthly budget:

Housing; 500

Utilities; 150

Household;65

Transportion;50

Food;250

Medical;30

Insurance;100

Entertainment;150

Clothing;75

Miscellaneous;50

-Write a program that has a Monthly Budget structure designed to hold each of these expense

categories.

-The program should pass the empty structure to a function that asks the user to enter the

amounts spent in each budget category during a month and return a structure as a result.

- Write a separate function to add a Monthly Budget Structure to a file. The writing task should add

the new Monthly Budget in one single line at the end of the file and preserve the old content.

-Write a separate function to count the number of lines in the file and return it as result.

- Write a separate function to show the saved Monthly Budgets from the file. The function reads data

from the file, saves it into a dynamically allocated array of Monthly Budgets and displays the

Monthly Budget list from the array.

- Your program must display a menu with three options, 1) Add a Monthly Budget, 2) Show List, 3)

Exit. The program must loop until the user selects option 3 and you must ensure the user has entered

a valid option.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!