You are building a simple budgeting application. The user will be prompted for their total income...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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? 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?
Expert Answer:
Answer rating: 100% (QA)
To implement the simple budgeting application in Java using an objectoriented solution you can follo... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Facebook has just issued its first bond. Its a 10-year issue with $1,000 face value and a 4% coupon rate. What is the r for this bond? Hint, r is in time units of 6 months, with semi-annual...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
1. Write a java program that allows a user to play 5 rounds of Rock-Paper-Scissors against a computer opponent. The user will be prompted with a choice between Rock, Paper and Scissors. A random...
-
In the Diffie-Hellman protocol, what happens if, x and y have the same value? That is, Alice and Bob have accidentally chosen the same number. Are the values of R1 and R2 the same? Are the values of...
-
In Problem 6.32, suppose it is desired to add a pump between A and B to drive the oil upward from A to B at a rate of 3 kg/s. At 100% efficiency, what pump power is required? Pa = 180 kPa pipe = 3 PA...
-
Ammonia flowing at 0.01 m3 /s is throttled from 900 kPa and 20°C to a pressure of 125 kPa by passing the refrigerant through the bank of small-diameter tubes shown in Fig. 4.58 that cause a...
-
Define Youngs modulus of elasticity.
-
1. Describe the market segment toward which the ReadyMade magazine is primarily targeted. 2. What key attributes of ReadyMade magazine appeal to this market segment? 3. How is the target market of...
-
Describe your efforts and the results of your own operant conditioning experiment. Any behaviors conditioned should be positive and not harmful to the subject of your experiment.
-
The following adjusted revenue and expense accounts appeared in the accounting records of Pashi, Inc., an accrual basis taxpayer, for the year ended December 31, Year 2. Revenues Net sales $3,000,000...
-
Using the information below -- what was Bala Industries' Cash Flow from Financing for the year ending 6/30/2011? Round to the nearest cent. Increase in inventories $31 Purchased treasury stock $18...
-
3. [7 points; 3, 1, 1, 2 points respectively] In the last couple of years Wells Fargo, one of the largest banks in the U.S., has been accused of bank scandals. [Hint: Internet research is...
-
If a particular company's stock is viewed by the financial markets as a great income stock that is expected to pay steady, equal, perpetual dividends. The firm presently has constant annual earnings...
-
In the United States, the 2012 Summer Olympics team was composed of more female athletes than male athletes for the first time ever. Discuss why it is important for women to also be equally...
-
Tobin's Barbeque has a bank loan at 10% interest and an after-tax cost of debt of 6%. What will the after-tax cost of debt be when the loan is due if a new loan is taken out yielding 12%. Note: Do...
-
What exactly is due diligence? How does it apply to acquisitions? How do we know that we have done our due diligence?
-
10. Solve u = curr using the method of separation of variables subject to the boundary conditions u(0,t) = 0 and u(1, t) = 0 and the initial condition u(x,0) = x(2-x).
-
Define cultural intelligence. Cite the books or journal articles you found in Capella's library. Explain why cultural intelligence is important for HR practitioners and other organizational managers.
-
Phil and Linda are 25-year-old newlyweds and file a joint tax return. Linda is covered by a retirement plan at work, but Phil is not. a. Assuming Phil's wages were $27,000 and Linda's wages were...
-
While preparing Massie Miller's 2012 Schedule A, you review the following list of possible charitable deductions provided by Massie: Cash contribution to a family whose house burned...
-
Quince Corporation has taxable income of $450,000 for its 2012 calendar tax year. Calculate the corporation's income tax liability for 2012 before tax credits. $_________
-
Identify each of the following as a consumer product or a business product, or classify it as both: a. frozen yogurt b. iPad c. gasoline d. boat trailer e. hand sanitizer f. Post-its
-
What are the steps in developing a marketing strategy?
-
What is the difference between primary data and secondary data?
Study smarter with the SolutionInn App