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
Hjnjjjhhbbfg66ui998876dch
GalinKa [24]
What is your question? I’ll try my best to help
4 0
3 years ago
What is used to configure data sources for applications that require access to a database?
Radda [10]
A network is used to configure data sources for applications that require access to a database?
6 0
3 years ago
How to make your nest learning thermostat stop doing something
k0ka [10]

Answer:

You could unplug it? LOL

and get a different thermostat.

Explanation:

Could you mark this answer as brainiest?

Thanks! :)

4 0
3 years ago
A computer with the ability to store instructions and do the job when requested by the operator, this type of computer had a spe
Sindrei [870]

Answer:

software's......................

8 0
3 years ago
Nosql is a great technology for storing well-structured data. <br> a. True <br> b. False
mash [69]
I'd say False

NoSQL or the non-rational databases are document oriented and distributed. Unlike the SQL or the relational databases which are structured, NoSQL deals with a huge amount of unstructured data and offer greater flexibility. NoSQL are more like file folders, gathering related information of all types.



3 0
3 years ago
Other questions:
  • How to you put a color into a cell? <br> a.Shading<br><br> b.Fill<br><br> c.Color<br><br> d.Insert
    8·1 answer
  • Image below please help
    9·1 answer
  • What is a life cycle
    15·2 answers
  • Help PLEASE (in attachment)
    8·1 answer
  • Load the titanic sample dataset from the Seaborn library into Python using a Pandas dataframe, and visualize the dataset. Create
    10·1 answer
  • the control programs managing computer hardware and software use the ______ function to control and prioritize tasks performed b
    8·1 answer
  • What will be the output of “AAAAMMMMMHHHVV” using a file compression technique?
    10·1 answer
  • Force field meaning in science fiction
    6·1 answer
  • Refer to the method f: Public int f( int k, int n ) { if( n == k ) return k; else if( n &gt; k ) return f( k, n - k ); else retu
    8·1 answer
  • The most common types of effects include entrances and exits
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!