Question: You are building a simple budgeting application. The user will be prompted for their total income for the month, and then can enter each
You are building a simple budgeting application. The user will be prompted for their total income for the month, and then can enter each category of their expenses and the amount for that category. At the end, you will display a dialog containing their total income and amount available for savings, and send a formatted report of their budgeted expenses to the console. This application must be developed using an object-oriented solution. Create a BudgetItem class that contains instance variables for the budget category name and the amount. Your BudgetItem class will also contain static variables for total income and total budgeted expenses. When the program starts, it should prompt the user for their total monthly income. Then it should repeatedly prompt the user for a category name and budget amount until the user indicates they are finished entering categories. Budget amounts must be positive. If the budget amount for that category would put their total budgeted expenses over their monthly income, don't accept the entry of that category. If all of the input for the category is acceptable, create a Budgetltem object, and then use its toString() method to add it to a string that you will display at the end of the program. (Note that we are doing this as we go along so that we don't have to worry about keeping access to the individual objects.) After the user has finished entering all input: Display a dialog listing their monthly income, total budgeted expenses, and savings amount (the difference between income and expenses). Print the entire monthly budget display string (built throughout the program as described in the second bullet above) to the console/screen using a method of System.out. This string should be nicely formatted, with one category on each line. Each line should contain the category name and amount. The overall appearance should be something like a table with two columns. Think about what type of validations might be appropriate for this application. Make sure these are all handled. Think about where methods are needed, and what class each method should belong to. Should they be static or instance methods?
Step by Step Solution
3.47 Rating (147 Votes )
There are 3 Steps involved in it
Here is a complete solution based on the requirements described in the images you provided ObjectOriented Budgeting Application 1 Class Design BudgetItem Class java public class BudgetItem private Str... View full answer
Get step-by-step solutions from verified subject matter experts
