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
Leona [35]
2 years ago
5

Malcolm Movers charges a base rate of $200 per move plus $150 per hour and $2 per mile. Write a program named MoveEstimator that

prompts a user for and accepts estimates for the number of hours for a job and the number of miles involved in the move and displays the total moving fee. For example, if 25 hours and 55 miles are input the output would be displayed as: For a move taking 25 hours and going 55 miles the estimate is $4,060.00
Computers and Technology
1 answer:
jeka942 years ago
6 0

Answer:

import java.util.Scanner;

public class MoveEstimator

{

public static void main(String[] args) {

   

    Scanner input = new Scanner(System.in);

    final int BASE_RATE = 200, RATE_PER_HOUR = 150, RATE_PER_MILE = 2;

    int hours, miles;

    double totalFee = 0.0;

   

 System.out.print("Enter the number of hours for a job: ");

 hours = input.nextInt();

 System.out.print("Enter the number of miles: ");

 miles = input.nextInt();

 

 totalFee = BASE_RATE + (hours * RATE_PER_HOUR) + (miles * RATE_PER_MILE);

 System.out.printf("For a move taking %d hours and going %d miles the estimate is $%.2f", hours, miles, totalFee);

}

}

Explanation:

*The code is in Java.

Create the Scanner object to be able to get input

Initialize the constant values using final keyword, BASE_RATE, RATE_PER_HOUR, RATE_PER_MILE

Declare the variables, hours, miles, totalFee

Ask the user to enter the hours and miles

Calculate the totalFee, add BASE_RATE, multiplication of  hours and RATE_PER_HOUR, multiplication of  miles and RATE_PER_MILE

Print the output as in required format

You might be interested in
When entering a function or formula in a cell, which of the first character you must type?
lions [1.4K]
When entering a function or formula in a cell, which of the first character you must type =
3 0
3 years ago
Read 2 more answers
What is rss A)real time story service B) real time story syndication C) really simple syndicationD)rapid story services
Novosadov [1.4K]

C) Really Simple Syndication

4 0
3 years ago
What are the contents of memory locations 200, 201, 202, and 203 if the word 1234 is stored at offset 200 and the word 5678 is s
Igoryamba

Answer:

Data at the following addresses will be as following:-

200 :- 34

201 :- 12

202 :- 78

203 :- 56

Explanation:

If there is 1 byte storage.

if the data is of 4 digits.Then we have to store it in 2 memory locations.

The first two digits will be stored at the higher byte address that is 201 and the last two digits will be stored at then lower byte address that is 200.

The case is same with the next data 5678.

At address 202 :- 78 will be stored and at address 203 :- 56 will be stored.

3 0
2 years ago
You configure a Windows laptop for a user who frequently travels and must connect to several wireless networks. While at a new b
aliina [53]

Answer:

Turn on file and printing sharing for all networks.

Explanation:

Windows has several security features when connecting to a network. In the control panel, you can access to Network and internet > Network and sharing center > Advanced sharing options. There you will see 3 different profiles, one for private networks, one for guest or public networks, and one for all networks.

You should take one of the 2 options. Enable file and printer sharing for all networks, so he can just print without doing anything more. Or keeping the print sharing just for private networks, and adding his new branch office's network to the private networks list.

8 0
3 years ago
SOMEONE PLEASE HELP ME OUT !!!!!!
GrogVix [38]

Answer:

not completly sure but i believe its the one that says inform the coach of where the goalies weak area...

Explanation:

8 0
2 years ago
Other questions:
  • The ____ operation is used to add an element onto the stack.
    15·1 answer
  • 10 facts about turbines
    11·2 answers
  • 1. JAVA Create one method to do the following expressions. Given the following declarations, what is the result of each of the e
    13·1 answer
  • Your company sent several staff members for UML training. An outside vendor provided the training. Everyone who attended the tra
    5·1 answer
  • What is a social media networks
    5·1 answer
  • What type of version of visual studio is the visual studio express
    8·1 answer
  • Hello Answerers it would be great if you could answer this:
    12·2 answers
  • 31
    10·1 answer
  • What would give Lucy, an entry-level candidate, an edge over others while she seeks a programmer’s position? Lucy, an entry-leve
    11·1 answer
  • To read encrypted data, the recipient must decipher it into a readable form. What is the term for this process?.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!