In the last chapter, you modified the RentalDemo program forSammy’s Seashore Supplies to accept and display data for an arrayof three Rental objects. Now, modify the program to use an array ofeight Rental objects. Prompt the user to choose an option to sortRentals in ascending order by contract number, price, or equipmenttype. Display the sorted list, and continue to prompt the user forsorting options until the user enters a sentinel value. Save thefile as RentalDemo.
java. import java.util.Scanner; class Rental { public staticfinal int MINUTES_IN_HOUR = 60; public static final doubleHOUR_RATE = 40.00; private String contractNumber; private inthours; private int extraMinutes;
PayPal Gateway not configured
PayPal Gateway not configured