You developed classes that hold rental contract information for Sammys Seashore Supplies. Now modify the Rental and

Question:

You developed classes that hold rental contract information for Sammy’s Seashore Supplies. Now modify the Rental and RentalDemo classes as follows:

  • Modify the Rental class to include an integer field that holds an equipment type. Add a final String array that holds names of the types of equipment that Sammy’s rents—personal watercraft, pontoon boat, rowboat, canoe, kayak, beach chair, umbrella, and other. Include get and set methods for the integer equipment type field. If the argument passed to the method that sets the equipment type is larger than the size of the array of String equipment types, then set the integer to the element number occupied by other. Include a get method that returns a rental’s String equipment type based on the numeric equipment type. 
  • To keep the RentalDemo class simple, remove all the statements that compare rental times and that display the coupon Strings. 
  • Modify the RentalDemo class so that instead of creating three single Rental objects, it uses an array of three Rental objects. Get data for each of the objects, and then display all the details for each object. Save the files as Rental.java and RentalDemo.java.
Coupon
A coupon or coupon payment is the annual interest rate paid on a bond, expressed as a percentage of the face value and paid from issue date until maturity. Coupons are usually referred to in terms of the coupon rate (the sum of coupons paid in a...
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Java Programming

ISBN: 978-1337397070

9th edition

Authors: Joyce Farrell

Question Posted: