subject

Sammy’s Seashore Supplies rents beach equipment such as kayaks, canoes, beach chairs, and umbrellas to tourists. In Chapter 3, you created a Rental class for the company. The Rental class contains two public final static fields that hold the number of minutes in an hour and the hourly rental rate ($40), and four private fields that hold a contract number, number of hours for the rental, number of minutes over an hour, and the price. It also contains two public set methods and four public get methods. Now, modify the Rental class to contain two overloaded constructors. One constructor accepts a contract number and number of minutes as parameters. Pass these values to the setContractNumber() and setHoursAndMinutes() methods, respectively. The setHoursAndMinutes() method will automatically calculate the hours, extra minutes, and price. The other constructor is a default constructor that passes "A000" and 0 to the two-parameter constructor. Save the file as Rental. java. b. InChapter3, object. Now, modify that class to instantiate two Rental objects. Instantiate one object to retain the constructor default values. Accept user data for the contract number and minutes fields and use this data set to instantiate the second object. Display all the details for both objects. Save the file as RentalDemo. java.

import java. util. Scanner;
public class {

public static void main(String[] args) {

// put a motto string
String sammyMotto=
"Sammy's makes it fun in the sun";
System. out. println("Sammy's Motto");
System. out. println(""+"");
// print motto string to console

System. out. println("*\t"+sammyMotto+"\t*");

System. out. println(""+"");

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 13:00
Which option should u select to ignore all tracked changes in a document
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
The song about casey jones a railroad engineer who gives his life on the job would most likely gall under the folk song category of? a-work song b-nonsense song c-religious song d-ballad
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
If an appliance consumes 500 w of power and is left on for 5 hours, how much energy is used over this time period? a. 2.5 kwh b. 25 kwh c. 250 kwh d. 2500 kwh
Answers: 1
question
Computers and Technology, 24.06.2019 12:30
Select all that apply. what two keys listed below should you use to enter data in an excel worksheet? tab backspace enter right arrow
Answers: 2
You know the right answer?
Sammy’s Seashore Supplies rents beach equipment such as kayaks, canoes, beach chairs, and umbrellas...
Questions
question
Biology, 26.09.2021 23:00
question
Mathematics, 26.09.2021 23:00
question
English, 26.09.2021 23:00
question
World Languages, 26.09.2021 23:00
question
Social Studies, 26.09.2021 23:00
question
Mathematics, 26.09.2021 23:00
question
Physics, 26.09.2021 23:00
question
Mathematics, 26.09.2021 23:00