Create a class to maintain a personal budget for a year


Create a class to maintain a personal budget for a year. The name of this class is Budget. The data your class will need, at a minimum, are:
•an array of categories (like Tuition, Food, Clothes, etc). You should have at least six categories. You can use your own expenses as a guide.

•an array for EACH category, storing the total monthly expenses for that category (think - how many items would be in each array?)

Create a constructor for the budget. You should have at least two constuctors - one if you have no expenses to record yet, and one if you are adding your first expense. Remember, each expense has two "fields" - the category name and the amount.

Create a method to add an expense to the budget. This method should know in which month the expense occurred, so figure out how many, and what data type, parameters are needed.

Create a method to print a report of the budget. Each category's current yearly total should appear on a separate line, and the final line would show the total expenses so far spent this year. For instance, a sample output might be:

> Expenses as of Nov 4, 2011:

> Tuition: $3200

> Food: $2600

> Clothes: $600

> Books: $450

> Total expenses: $6850 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Create a class to maintain a personal budget for a year
Reference No:- TGS0117559

Expected delivery within 24 Hours