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
Help!! Best answer will get Brainliest!!
Eddi Din [679]

Answer:

answer(s):

-set goals

-select a topic

-write down research questions

Hope this helped and sorry for the bold. <3

Explanation:

6 0
2 years ago
Read 2 more answers
Oliva was a sophomore thriving in college when her father was laid off from his job. Even with financial aid, the family could n
Zielflug [23.3K]

Answer:

Linked Lives

Explanation:

Linked-lives is a popular preposition, the idea is that people who are related to each like father-child or mother-child relationship have similar influencing trajetories of development that cuts across their lives.

6 0
3 years ago
Should you ever force a CPU into<br>its socket?​
tatyana61 [14]

Answer:

no you should not force a cpu into its socket.

Explanation: on an intel platform the pins are on the motherboard, therefore if you force it in it will damage the pins on the motherboard, and on AMD the pins are on the cpu itself so you can damage the extremely fragile pins on it, you can not shock your cpu however like the other answer.

7 0
3 years ago
A security system uses sensors at every door and window which will set off an alarm if any one of them is opened. There is also
AnnyKZ [126]
You have a raspberry pi connected to all the sensors and a code running to  trigger if the sensors are triggered. Each sensor and keypad would run to a different input on the pi. They should al be able to be powered with a single cell lipo. Is that what you are asking?
5 0
3 years ago
What is the value of creating recurring tasks?
scoundrel [369]

Answer:

✔️saves time spent manually creating multiple tasks

Explanation:

I did it on edge

4 0
2 years ago
Read 2 more answers
Other questions:
  • A type of bridge that relies on a curved, semi-circular structure for support
    5·1 answer
  • To insert a new slide in an existing presentation, what menu should you select?
    5·2 answers
  • Which of the following is a goal of paraphrasing​
    12·1 answer
  • When using the red / yellow / green method to present status of a project, yellow can mean which of the following? A. There are
    5·2 answers
  • Maia notices that her paragraphs are too close to one another. She wants to increase the space. Which arrangement of steps does
    6·2 answers
  • Write a function named printtriangle that receives a parameter that holds a non-negative integer value and prints a triangle of
    7·1 answer
  • WHAT IS A COMPUTER ????
    14·2 answers
  • In rolling a die four times, what is the odds that at least one 5 would appear?
    6·1 answer
  • Give an example of at least one information system you know or have heard of.
    9·2 answers
  • Ok.,so i have a sopitify account and by accident i pressed the downlaod on button and it says start you free trial i pressed tha
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!