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
olga2289 [7]
3 years ago
13

ammy'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:
melomori [17]3 years ago
8 0

Answer:

// Here is SammysRentalPrice.java file

// import package

import java.util.*;

// class definition

class SammysRentalPrice

{

   // main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // object to read value from user

    Scanner scr=new Scanner(System.in);

    // ask to enter rented minutes

       System.out.print("enter rented minutes: ");

       // read minutes

       int min=scr.nextInt();

       // find hours

       int hour=min/60;

       //reamining minutes

       min=min%60;

       // total cost

       int cost=hour*40+min*1;

       // print cost

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

   }catch(Exception ex){

       return;}

}

}

Explanation:

Read rented minutes from user and assign it to variable "min".Find the hours from minutes and then update the remaining minutes.After this multiply hours with 40 and remaining minutes with 1.Sum them and this will be the cost of rented a sports equipment.

Output:

enter rented minutes: 145

total cost is: 105

You might be interested in
A(n) _____ is a common output device for hard copy.
Sidana [21]
The answer is d it is d it is d I think I think, I’m not sure though
8 0
3 years ago
Is a display, or monitor, considered a piece of computer hardware
9966 [12]
Yes. The monitor is considered as a piece of Computer Hardware. Computer hardware is what you can physically touch, like the keyboard, mouse, monitor, disk drive, and so on.

I hope this answers your question.

Thank you,
Otaku
3 0
3 years ago
What is the best way to describe the relationship between two companies that offer basically the same product or service?
fenix001 [56]
Compare the products together
8 0
3 years ago
Read 2 more answers
How do i download my music from my computer to google play?
tresset_1 [31]
You can't do it to Google play. but you can connect to your computer and extract it and play it as a file
8 0
3 years ago
Sends a copy of the message and any additional comments to a different e-mail address
Debora [2.8K]

Answer:

Forward.

Explanation:

E-mail is an acronym for electronic mail and it can be defined as a set of written words, texts, characters used for conveying a message from one person to another. It is a channel or medium of communication between one person and the other.

Forward simply sends a copy of the message and any additional comments to a different e-mail address. The term forward is used in email to describe the process of sending a message.

3 0
3 years ago
Other questions:
  • In programming, what is a floating-point number?<br>​
    7·1 answer
  • ___________ is a mass-produced, copyrighted software that meets the needs of a wide variety of users, not just a single user or
    15·1 answer
  • The syntax used for referencing cells with their worksheet names is the sheet name, followed by ____, then the usual column lett
    8·1 answer
  • Is the cell phone changing our views about polite and impolite behavior? For example,
    15·2 answers
  • Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print forwards
    9·1 answer
  • In ________ for final fields and methods the value is assignedlater but in ______ you assign the value during declaration.
    15·1 answer
  • When you think of computers, I want you to think:
    7·1 answer
  • Word documents contain how many sections by default?
    9·1 answer
  • Mike gets along with his co-workers and is always helpful to the clients. He demonstrates good _____.
    7·2 answers
  • Candy Kane Cosmetics (CKC) produces Leslie Perfume, which requires chemicals and labor. Two production processes are available:
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!