I am trying to create a program where depending on which item you want to rent, you will be asked the number of day you will be renting and then will receive a bill that will show you your total, subtotal, etc... When I try to compile the program I get an error. Can you please help me find the problem!
import javax.swing.JOptionPane; public class RentalDialog { double TAX = 0.05; double bookCOST = 1.50; double movieCOST = 2.00; double CDCOST = 1.00; public static void main(String[] args) { double taxAmount, subtotal, total; int numDays; int RentalType = Integer.parseInt(JOptionPane.showInputDialog(null, "Which item would you like to rent?:\n1. Book\n2. Movie\n3. CD")); double RentalFee = 0; switch (RentalType) { case 1 : { numDays=Integer.parseInt(JOptionPane.showInputDialog("How many days did you want to rent the book at "+bookCOST+ " each:")); subtotal = numDays*bookCOST; taxAmount = subtotal * TAX ; total = subtotal + taxAmount; } case 2 : { numDays=Integer.parseInt(JOptionPane.showInputDialog("How many days did you want to rent the movie at "+movieCOST+ " each:")); subtotal = numDays*movieCOST; taxAmount = subtotal * TAX ; total = subtotal + taxAmount; } case 3 : { numDays=Integer.parseInt(JOptionPane.showInputDialog("How many days did you want to rent the DVD at "+DVDCOST+ " each:")); subtotal = numDays*DVDCOST; taxAmount = subtotal * TAX ; total = subtotal + taxAmount; } }