subject

A. Sammy's Seashore Supplies rents beach equipment such as kayaks, canoes, beach chairs, and umbrellas to tourists. Develop an application that prompts the user for the number of minutes a piece of sports equipment was rented, displays the company motto with a border, and displays the price for the rental. Now modify the program so that the main() method conatins only three executable statments that each call a method as follows: - The first executable statement calls a method that prompts the user for the rental time in minutes and returns the value as the main()method
- The first executable statement calls a method that displays the company motto with the border.
- The last executable statement passes the number of minutes to a method that computes the hours, extra minutes, and price for the rental, and then displays all the details.
Save the file as .java
B. Create a class to hold the rental data for Sammy's Seashore Supplies. The class contains:
- Two public final static fields that hold the number for minutes in an hour and hourly rate ($40)
- Four private fields that hold a contract number, number of hours for the rental, number of minutes over an hour, and the price. The contract number is stored as String because Sammy plans to assign contract numbers such as K681.
- Two public set methods. One sets the contract number (setContractNumber()). The other is named setHoursandMinutes(). and it accepts the number of minutes for the rental and then sets the hours, extra minutes over an hour, and the total price. The price is $40 per hour plus $1 for every extra minute.
- Four public get methods that return the values in the four nonstatic fields
C. Use the class you created in Step 2a as a starting point for a program that demonstrates the Rental class you created in Step 2b, but make the following changes:
- You already have a method that gets the number of minutes from a user; biw add a method that gets a contract number. The main() method should declare a Rental object, call the two data entry methods, and use their returned values to set the fields in the Rental object.
- From the class, call the Rental Demo method that displays that company motto with the border. The method is accessible becuase it is public, but you must fully qualify the name becuase it is in another class.
- Revise the method that displays the rental details so that it accepts the newly created Rental object. The method should display the contract nuber, and it should still display the hours and minutes, the hourly rate, and the total price.
D. Save the program as RentalDemo. java
What additional information is missing?

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:00
According to alisa miller foreign news bureaus
Answers: 3
question
Computers and Technology, 22.06.2019 17:50
Farah works in an office with two other employees. all three share a printer and an internet connection. the utility that makes this possible is defragger quicktime soho winzip
Answers: 1
question
Computers and Technology, 22.06.2019 18:00
Write a method named addall that could be placed inside the hashintset class. this method accepts another hashintset as a parameter and adds all elements from that set into the current set, if they are not already present. for example, if a set s1 contains [1, 2, 3] and another set s2 contains [1, 7, 3, 9], the call of s1.addall(s2); would change s1 to store [1, 2, 3, 7, 9] in some order. you are allowed to call methods on your set and/or the other set. do not modify the set passed in. this method should run in o(n) time where n is the number of elements in the parameter set passed in.
Answers: 2
question
Computers and Technology, 22.06.2019 22:10
Asequential circuit contains a register of four flip-flops. initially a binary number n (0000 ≤ n ≤ 1100) is stored in the flip-flops. after a single clock pulse is applied to the circuit, the register should contain n + 0011. in other words, the function of the sequential circuit is to add 3 to the contents of a 4-bit register. design and implement this circuit using j-k flip-flops.
Answers: 1
You know the right answer?
A. Sammy's Seashore Supplies rents beach equipment such as kayaks, canoes, beach chairs, and umbrell...
Questions
question
Mathematics, 07.12.2021 04:50
question
Mathematics, 07.12.2021 04:50
Questions on the website: 13722361