Assignment on budgeter-java

Assignment Help Business Management
Reference no: EM132265491

Budgeter.java

This interactive program focuses on if/else statements, Scanner, and returning values. a file named Budgeter.java. To use a Scanner for console input, you must import java.util.*; in your code.

This program prompts a person for income and expense amounts, then calculates their net monthly income. Below are two example logs of execution from the program. This program's behavior is dependent on the user input (user input is bold and underlined below to make it stand out). Your output should match our examples exactly when given the same input. (Be mindful of spacing, such as after input prompts and between output sections.) Look at the other example logs on the Canvas site to get more examples of the program's behavior.

The program begins with an introductory message that briefly explains the program. The program prompts the user for the number of income categories, then reads in that many income amounts. Next, the program asks whether the user would like to enter monthly or daily expenses. (The user enters 1 for monthly and 2 for daily.) The program will then read in a number of expense categories and an amount for each category, similar to how income was read.

The program should then print out the total amount of income and expenses for the month, as well as the average amount of each per day. You may assume a month has exactly 31 days, though your program should be able to be easily modified to change this assumption (see below).

After printing the total income and expenses, the program should print out whether the user spent or earned more money for the given month and by how much. If income and expenses were exactly equal, the user is considered to have earned $0 more than they spent (as opposed to spending $0 more than they earned).

Finally, the program should print out which category the user falls into based on their net income for the month (rounded to two decimal places). The user's net income is the result of subtracting their expenses from their income. The four categories are defined as follows:

More than +$250: "big saver"

More than $0 but not more than +$250: "saver"

More than -$250 but not more than $0: "spender"

-$250 or less: "big spender"

After printing the user's category, print a custom message of your choice about their spending habits. This message should be different for each range shown above. It should be at least 1 line of any non-offensive text you like.

Sample run. Things in bold and underlined are user input:

This program asks for your monthly income and

expenses, then tells you your net monthly income.

How many categories of income? 3

Next income amount? $1000

Next income amount? $205.25

Next income amount? $175.50

Enter 1) monthly or 2) daily expenses? 1

How many monthly categories of expense? 4

Next expense amount? $850

Next expense amount? $49.95

Next expense amount? $75

Next expense amount? $120.67

Total income = $1380.75 ($44.54/day)

Total expenses = $1095.62 ($35.34/day)

You earned $285.13 more than you spent this month.

You're a big saver.

<<your custom message here>

Another sample run. Things in bold and underlined are user input:

This program asks for your monthly income and

expenses, then tells you your net monthly income.

How many categories of income? 2

Next income amount? $800

Next income amount? $200.25

Enter 1) monthly or 2) daily expenses? 2

How many daily categories of expense? 1

Next expense amount? $45.33

Total income = $1000.25 ($32.27/day)

Total expenses = $1405.23 ($45.33/day)

You spent $404.98 more than you earned this month.

You're a big spender.

<<your custom message here>

This program processes user input using a Scanner. All monetary inputs will be real numbers; all other input will be integers. You may assume the user always enters valid input. When prompted for a value, the user will enter a value of the correct type. The user will enter a number of income and expense categories ≥ 1 and will only ever enter 1 or 2 when asked how to enter expenses. The amount for each category of income and expense will be a non-negative number.

You are required to define a class constant for the number of days in a month. You should refer to this constant throughout your program so that the value can be changed and your program will continue to function correctly. 

Reference no: EM132265491

Questions Cloud

Cyber command and the nsa : QUESTION 1: What are the differences between what Cyber Command and the NSA can do in cyber warfare?
When is the best time to use for loop over while loop : In your point of view, when is the best time to use for loop over while loop? Give an example from our real-life when we can use sentinel value with a loop.
What are two things that come easy for you when communicate : Explain, based on your quiz, what are two things that come easy for you when communicating and what are two things that are more difficult.
Calculate the precision of distance measurement : Calculate the precision of distance measurement with the total station - calculate the Northing, Easting, and Elevation of stations A and B
Assignment on budgeter-java : This interactive program focuses on if/else statements, Scanner, and returning values. a file named Budgeter.java. To use a Scanner for console input
Define the overall readability and meaning of the project : Composition deals with the overall readability and meaning of the project. As noted by Kirk (2016), the topic of composition is divided into project-level.
Review the state level homeland security systems : Review the state level homeland security systems . Choose one of these resources that is available to the governor.
Main office on a regular basis : The option to approve updates is not available on the branch office server, yet it receives updates from the WSUS server at the main office on a regular basis.
Business as certain form of business organization : What steps could one take to minimize the amount of federal income taxes imposed upon each type of business enterprise?

Reviews

Write a Review

Business Management Questions & Answers

  Comparative shopping for vacations

Is online comparative shopping for vacations and other travel all that it is "cracked up to be" or have consumers "lost out" using online shopping.

  Prepare a guide for students on the importance of acedemic

prepare a guide for students on the importance of acedemic integrityplease compose an essay on academic intergrity that

  Differentiate between restitution and compensation

Discuss the relationship between Sections 39, 64 and 65. Is any difference between putting an end to the contract and rescinding from it?

  Transportation and inventory holding costs into account

Have you ever been involved in a decision that takes both transportation and inventory holding costs into account?

  Price elasticity of demand elastic or in elastic

a) Calculate the price elasticity if demand involved here (correct to 2 decimal places)

  Explain concepts and find a related article at the bloomberg

Explain concepts and find a related article at the Bloomberg / Business Week Magazine- Compose an analysis of that event or situation using the weekly operations concept that you selected.

  What is a sentinel event

What is a sentinel event? How is it processed in a healthcare organization? Please state citations.

  Impact on time-management within projects

How ineffective communication and resource constraints can impact on time-management within projects?

  Technology that we have makes total force concept work

America is in a position, where she faces obstacles in every direction. Often it seems at the root of the obstaces are monetary fiscal barriers.

  Discuss apples stance on empowering workers areas

Discuss Apple's stance on each of the following areas: Empowering workers, Labor and Human Rights, Health and Safety, The Environment and Accountability.

  Concepts of linkage

What are the advantages and disadvantages of each of the tools? Explain front end and back end tools. Explain the concepts of "linkage and synergy as they relate to IMC.

  Explain the present realities of women leadership roles

Give your opinion as to whether or not you believe that men and women should have equal treatment in sexual harassment issues. Defend your answer with two (2) examples that support your rationale.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd