Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

JDBC Database Programming With J2ee

Authors: Art Taylor

1st Edition

0130453234, 978-0130453235

More Books

Students also viewed these Databases questions