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
What is the force generated by a rocket motor to propel a spacecraft forward?
Burka [1]
That would be D: Thrust
3 0
3 years ago
You were just hired as an IT Specialist for Smalltown School District. Your first assignment is to review a problem area& in
umka21 [38]

Answer:

Explanation:

There are various questions that you can ask in this scenario, such as

What grading policies are being implemented?

How many student grades are being calculated by the program?

What is the requirements for a student to pass?

All of these questions would allow you to get an idea of how extensive the code may be and its complexity. Once you know this you would look at the code revolving around actually looping through the data and doing the necessary calculations. You can then determine how to manipulate the code and make it much more efficient.

You would also need to know how the student data is being saved, which will help determine if it is the best data structure for saving this type of data or if it can be replaced in order to maintain the data secure while increasing the speed of the program. Mainly since this information needs to be continuously used from the data structure.

3 0
3 years ago
A derived class is a class that inherits data members and functions from a ____ class.
mezya [45]
The answer is superclass
6 0
3 years ago
In the electric series, which one of the following materials is the most negatively charged? A. Silk B. Sealing wax C. Teflon D.
Snowcat [4.5K]
C) Teflon (:


Good luck!
7 0
3 years ago
Read 2 more answers
Structured walk-throughs take place throughout the SDLC and are called _____ reviews, depending on the phase in which they occur
Tpy6a [65]

Answer:

design

Explanation:

Based on the information provided within the question it can be said that these are called design reviews. This is one of the most important parts of the development of a system. This focuses more on answering how something is going to be done in the system as opposed to answering what is going to be done for the system depending on the questions asked in the analysis phase.

5 0
3 years ago
Other questions:
  • What is the resistance of a 1,000-foot length of #6 AWG wire at a temperature of 25 degrees C? A. 0.1593 ohm B. 0.4028 ohm C. 0.
    7·1 answer
  • What are the uses of joystick​
    13·1 answer
  • When projecting a presentation on a large screen, what should your minimum font size be?
    6·2 answers
  • Connect 5 LEDs with any random colors. Iteratively, turn ON 1 to 5 LED(s) that will take 5 iterations in total, and in every ite
    6·1 answer
  • Juan has performed a search on his inbox and would like to ensure the results only include those items with attachments which co
    14·2 answers
  • Which of the following statements best reflects the pros and cons of overtime potential for a line installer or repairer?
    15·1 answer
  • A customer is looking for a storage archival solution for 1,000 TB of data. The customer requires that the solution be durable a
    9·1 answer
  • Explain the term information security?​
    9·1 answer
  • List three features of the third generation of computers
    13·1 answer
  • An electronic element that stores data by changing its resistance based on the current that has passed through it (similar to RR
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!