Question: help me correct this code: import javax.swing.JOptionPane; public class RentalDemo { private static int minutes; public static void main ( String [ ] args )
help me correct this code: import javax.swing.JOptionPane;
public class RentalDemo
private static int minutes;
public static void mainString args
Rental rentals new Rental;
for int i ; i rentals.length; i
String contactNumber JOptionPane.showInputDialognull "Enter contract number: "Sammy's Seashore Supplies", ;
rentalsi new RentalcontactNumber minutes;
int minutes ;
while minutes minutes
minutes Integer.parseIntJOptionPaneshowInputDialognull "Enter the number of minutes : "Sammy's Seashore Supplies", ;
String output "Contract Number: rentalsigetContractNumber;
output output
Time: rentalsigetHours hours and rentalsigetMinutes minutes";
output output
Total Price: $ rentalsigetPrice;
JOptionPane.showMessageDialognull output, "Sammy's Seashore Supplies", ;
if i
int hours rentalsgetHours;
for int j ; j minutes; j
JOptionPane.showMessageDialognull "Coupon good for percent off next rental", "Sammy's Seashore Supplies ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
