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
Orlov [11]
3 years ago
9

Sammy's Seashore Supplies rents beach equipment such as kayaks, canoes, beach chairs, and umbrellas to tourists. Write a program

that prompts the user for the number of minutes he rented a piece of sports equipment. Compute the rental cost as $40 per hour plus $1 per additional minute. (You might have surmised already that this rate has a logical flaw, but for now, calculate rates as described here. You can fix the problem after you read the chapter on decision making.) Display Sammy's motto with the border that you created in the SammysMotto2 class in Chapter 1. Then display the hours, minutes, and total price. Save the file as SammysRentalPrice.java.
Computers and Technology
1 answer:
murzikaleks [220]3 years ago
7 0

Answer:

// here is code in java.

import java.util.*;

// class definition

class SammysRentalPrice

{

// main method of the class

public static void main(String[] args) {

    // scanner object to read input from user

    Scanner s=new Scanner(System.in);

      // ask user to enter year

       System.out.print("Enter the rented minutes:");

       // read minutes

      int min=s.nextInt();

      // find hpurs

      int hours=min/60;

      // rest  of minutes after the hours

      min=min%60;

      // total cost

      int tot_cost=(hours*40)+(min*1);

      // print hours,minute and total cost

      System.out.println("total hours is: "+hours);

      System.out.println("total minutes is: "+min);

      System.out.println("total cost is: "+tot_cost);

     

}

}

Explanation:

Read the rented minutes of an equipment from user with the help of scanner object. Calculate the hours and then minutes from the given minutes.Calculate the cost by multiply 40 with hours and minute with 1.Add both of them, this will be the total  cost.

Output:

Enter the rented minutes:140

total hours is: 2

total minutes is: 20

total cost is: 100

You might be interested in
Which of the following is one aspect of gaming that goes relatively unnoticed but
inessss [21]

Answer:

frame rate

Explanation:

4 0
3 years ago
Greg works for an online games development company. He is not a net freak, but occasionally he visits online literature sites an
sweet-ann [11.9K]

Answer:

i think its A

Explanation:i hope i helped

5 0
3 years ago
Antonio’s computer is hung up. which trio of keys should he press to restart his computer?
IgorLugansk [536]

Ctrl + Alt + Delete is the keys used by some PCs to reboot frozen computers by using task manager to kill any nonresponding applications. Another way to do this on some other is Ctrl + Shift + Esc.

6 0
3 years ago
Read 2 more answers
What is printed when the following code has been executed?
serg [7]
Hey it is 15 hope this helps
3 0
3 years ago
Effective note-taking helps support<br><br> action.<br> distinction.<br> distraction.<br> retention.
zloy xaker [14]
It is the last one retention because writing it out will cause it to stick in your brain better
7 0
3 years ago
Read 2 more answers
Other questions:
  • Assume the existence of a Building class with a constructor that accepts two parameters:_________ a reference to an Address obje
    5·1 answer
  • What is difference between actual parameters and formal parameters in java?​
    8·2 answers
  • Which inserted element in an email message displays a graphic from a data source
    15·2 answers
  • Example of a question that could NOT be answered with a binary message
    10·2 answers
  • Mario wants to use computer.what is the first thing needs to know<br><br>​
    6·1 answer
  • True or False: <br> The object reference can be used to polymorphically store any class in Java.
    13·1 answer
  • True/False/Unknown. For the interpretation of function calls, we assign the formal parametersto the valuations of the actual arg
    11·1 answer
  • Why there isn't in italian this app?​
    15·1 answer
  • :(.
    5·2 answers
  • I NEED THIS DONE NOW ASAP, PLS HELP ME
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!