1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
goldfiish [28.3K]
2 years ago
14

16. Budget Analysis Write a program that asks the user to enter the amount that he or she has budgeted for a month. A loop shoul

d then prompt the user to enter each of his or her expenses for the month, and keep a running total. When the loop finishes, the program should display the amount that the user is over or under budget.
Computers and Technology
1 answer:
strojnjashka [21]2 years ago
6 0

Answer:

import java.util.Scanner;

public class num8 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter month's budget");

       double monthBudget = in.nextDouble();

       double totalExpenses = 0.0;

       double n;

       do{

           System.out.println("Enter expenses Enter zero to stop");

           n = in.nextDouble();

           totalExpenses += n;

       }while(n>0);

       System.out.println("Total expenses is "+totalExpenses);

System.out.println("The amount over your budget is "+ Math.abs(monthBudget-totalExpenses));

   }

}

Explanation:

  • Using Java programming language
  • Prompt user for month's budget
  • Use Scanner class to receive and store the amount entered in a variable
  • Use a do while loop to continuously request user to enter amount of expenses
  • Use a variable totalExpenses to add up all the expenses inside the do while loop
  • Terminate the loop when user enters 0 as amount.
  • Subtract totalExpenses from monthBudget and display the difference as the amount over the budget

You might be interested in
QUESTION 56 Use the Windows ________ to check on a nonresponsive program. Backup utility Error-checking System Restore Task Mana
ASHA 777 [7]

Answer: Task manager

Explanation: The task manager window represents an interface in personal computers manufactures by Microsoft. The task manager window contains several information about a computers current processes usually displayed in graphical manner, in addition it provides information on the current running processes and application, the uptime of the computer, the graphic processor. With the task manager window users can set process priorities and prioritize applications, by affording users to view process and their corresponding load on the CPU, users can terminate or close applications from within the task manager interface. Hence non-responsuve programs can be viewed and terminated.

5 0
3 years ago
Bcghxdfghncfghndfgxdfgjfjgktyerdgftguj
IgorLugansk [536]

Answer:

Okay

Explanation:

4 0
3 years ago
Read 2 more answers
What are two preferences a user can indicate for the Junk Email folder?
marysya [2.9K]
Did you mean this?
<span>Controls are divided between two locations: (a) </span>Tools -> Options<span> -> Security -> Junk, and (b) Tools -> Account Settings -> *each account* -> Junk Settings.</span>
5 0
3 years ago
Read 2 more answers
If a form-based code is administered, then what does the administration section of the code specifically set forth?
Mamont248 [21]

Answer:

Form-based codes have a description of what uses a building or a place is permitted but focus on the physical character of construction, particularly how they relate to the public realm shared by everybody. More and more people across the country and around our world have seen form-based codes as a more effective and efficient method to accomplish what they want, protect what they care about and escape what they do not want.

Explanation:

In the 1980s a group of architects and designers were trying to construct an alternative to traditional zoning, focusing less on use and more on size, construction speed, the shape of public spaces and the connections between buildings. Throughout this time the Duany Plater-Zyberk & company was planned to create a new community based on traditional neighborhood design concepts, Seaside, Florida, which originally developed an earlier modern type code to direct the development of the new community. The entire municipal code of Seaside was graphically illustrated on one poster as a radical deviation from traditional zoning.

6 0
3 years ago
. List four different ways automation can be used in testing?
hichkok12 [17]

Answer:

Automation testing can be used for:

<u>Input-output test :</u> If the main function of your software is to transform input data into output data you can configure a new test by providing a new input/output pair, then the test will check to see if the output matches with the expected values.

<u>Unit test :</u> This test is a script to check the return values of a specific code by initializing it and calling his methods. This is a part of a test-driven development process.

<u>Integration test :</u> This test is a code level script that does a complete check process involving multiple objects. For example, you might make a test for “buy a product” which checks to see if the database is updated, if the data is correct of the person is correct, and if the person placing the order gets the right confirmation email.

<u>Smoke Tests:</u> This test is executed immediately after implementation on production to ensure that the application is still functioning.

6 0
3 years ago
Other questions:
  • The ____ operation is used to add an element onto the stack.
    15·1 answer
  • What is authentication?
    8·1 answer
  • I have a problem with importing excel file into Access. I have some table in Excel and I want to import it into Access. When I d
    6·2 answers
  • In steps<br> Urgent please
    14·1 answer
  • Carol typed a memo to send to everyone in her department. To create this memo, she used a _____. spreadsheet word processor fax
    10·2 answers
  • Which f the following is not a characteristic of igneous rock
    8·1 answer
  • Which of the following is a rule of thumb for cell phones or smartphone etiquette ?
    12·1 answer
  • What are the cues that a website is safe to use for exchanging sensitive information?
    10·1 answer
  • Which Packet Tracer feature do you think will be most helpful for you in learning how to manage a network
    5·1 answer
  • Identify the end-to-end processes that should appear in the process landscape model.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!