import javax.swing.*; public class CashierThree { public void ringUpCustomer() { String item; double total = 0.0, milkPrice = 3.50, bottleWaterPrice = 1.0; double sugarPrice = 1.25; do { item = JOptionPane.showInputDialog("Enter Item Description"); if (item.equals("milk")) { total = total + milkPrice; } else if (item.equals("bottleWater")) { total = total + bottleWaterPrice; } else if (item.equals("sugar")) { total = total + sugarPrice; } } while (!item.equals("end")); JOptionPane.showMessageDialog(null, "Amount Due: $" + total); } }