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]
3 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:
jeka943 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
How to bold words in microsoft word
kondor19780726 [428]

Answer:

highlight what you want to bold and then press CTRL+B.

Explanation:

Hope this helped.

5 0
3 years ago
Which of these is a sign of healthy A)very high inflation B)A rise in consumers spending C)a shift supply of essential goods D)H
klemol [59]

im sorry i meant C 100%

6 0
3 years ago
Read 2 more answers
Can someone help me with python
pishuonlain [190]

Answer:

here

Explanation:

Python is an interpreted high-level general-purpose programming language. Its design philosophy emphasizes code readability with its use of significant indentation.

7 0
3 years ago
I try to make an account so I can have some help, but it always says "We’re sorry, but we are not able to complete your registra
Romashka-Z-Leto [24]

Answer:

that keeps happening to me too i sent them a email and they said they are trying to fix it

8 0
3 years ago
Which conditional tab would you use to add a quick style to a form or report? Arrange Design Format Page Setup
Vilka [71]

Answer:Format

Explanation:

5 0
3 years ago
Other questions:
  • __________ ensures that the individual is who they claim to be (the authentic or genuine person) and not an imposter.
    15·1 answer
  • While ________ is centered on creating procedures, ________ is centered on creating objects. Procedural programming, class progr
    10·1 answer
  • In microsoft what displays when the mouse pointer rests on selected text or data that can be formatted.
    8·1 answer
  • Oop skskskssksksksksk
    15·2 answers
  • What software would you recommend for design?
    7·1 answer
  • Global knowledge is the same as common knowledge.
    15·2 answers
  • Which of the following are the benefits of using Responsive Display Ads?
    9·1 answer
  • Can we update App Store in any apple device. (because my device is kinda old and if want to download the recent apps it aint sho
    10·1 answer
  • Databases containing the research, writing and studies conducted by Academic
    14·1 answer
  • What will happend when I got a BSOD in Windows?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!