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
Someone, please answer this.
Sav [38]

Answer: A loop will continue running until the defined condition returns false . ... You can type js for , js while or js do while to get more info on any of these. ... initialization - Run before the first execution on the loop. ... But it can be used to decrement a counter too. statement - Code to be repeated in the loop.

Explanation:

7 0
3 years ago
9.A major step before taking print of the document is (3 points)
olya-2409 [2.1K]

Answer:

Uhyuuuuufuddirueueurururururru

8 0
2 years ago
"Save" or "save as" can be used interchangeably and have no unique features.<br> True<br> False
zimovet [89]

Answer:

False.

Explanation:

"save" just preserves any edits made to file in its current state. "Save As" lets you rename it and change the file type.

4 0
3 years ago
Read 2 more answers
What are the 3 attributes of information?
Anton [14]

As previously said, the three highly important qualities of validity, accuracy, and completeness can be expanded into the information quality of integrity.

For information to be valuable and to meet the definition of information, it must largely have the characteristics of relevance, availability, and timeliness. Accuracy, completeness, consistency, distinctiveness, and timeliness are five qualities of high-quality information. For information to be accurate and valuable, it must be of high quality. Standard attributes, commonly referred to as global attributes, work with a wide variety of elements. The essential attributes such as accesskey, class, contenteditable, contextmenu, data, dir, hidden, id, lang, style, tabindex, and title are included in them.

Learn more about information here-

brainly.com/question/5042768

#SPJ4

4 0
1 year ago
Of the following choices, what indicates the primary purpose of an intrusion detection system (IDS)?
MrRa [10]
That would be (A) because an IDS stands for Intrusion detection system which means that when there’s malicious activity or policy violations. Any malicious activity or violation is typically reported either to an administrator.
8 0
3 years ago
Other questions:
  • 1- Design a brute-force algorithm for solving the problem below (provide pseudocode): You have a large container with storage si
    10·1 answer
  • Damion recently did an update to his computer and added a new video card. After the update, Damion decided that he would like to
    13·1 answer
  • Numeric data is stored in ___________ for direct processing.
    10·2 answers
  • Describe two ways in which an organizer can assist in taking notes
    8·2 answers
  • To configure a router / modem, what type of IP interface configuration should you apply to the computer you are using?
    8·1 answer
  • ​_____ was the first commercially successful computer. ​z3 ​eniac ​univac ​colossus
    13·1 answer
  • Which of the following types of cloud platforms would a webmail service offered to the general public be considered?
    9·1 answer
  • Write a program "addnumbers.c" where it takes as many arguments as the user includes as command line arguments and calculates th
    11·1 answer
  • PLZ help
    5·1 answer
  • Select the correct answer from each drop-down menu.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!