title: Calculating a discount
body: <p>I'm looking for a reason why this code will only use the 10% discount scenario listed below no matter what I input for the discountPercentage input message box. I need to make it so that the only percentages that will be calculated are 10%, 15%, or 25%. If a user enters anything else into the discountPercentage  input message box, the discount will default to 10% off price 1.</p>
  
  <pre><code>import javax.swing.JOptionPane;
  import java.text.DecimalFormat;
  
  public class  Assignment3 {
  
      public static void main(String[] args) {
          // Calculate the discount price of an item
  
          // Convert price to display as decimal format
              DecimalFormat df = new
              DecimalFormat("#,###,##0.00");
  
          // Declare discountPercentage variable    
  
  
          // Display message boxes for price and percentage entries
          double price1 = Double.parseDouble(JOptionPane.showInputDialog( null, " Enter item price (ex:2.35): "));
          double discountPercentage = Double.parseDouble(JOptionPane.showInputDialog( null, " Enter discount percentage "));
          int dicountPercentage = 0;
  
          // Declare if else statements for output calculations
             if (discountPercentage &gt; 25){
  
             JOptionPane.showMessageDialog(null, " The discounted price is: " + "$" + df.format(price1 - .10 * price1));
  
             }else if (dicountPercentage == 25){
  
             JOptionPane.showMessageDialog(null, " The discounted price is: " + "$" + df.format(price1 - .25 * price1));
  
             } else if (discountPercentage &gt; 15){
  
             JOptionPane.showMessageDialog(null, " The discounted price is: " + "$" + df.format(price1 - .10 * price1));
  
             } else if (dicountPercentage == 15){
  
             JOptionPane.showMessageDialog(null, " The discounted price is: " + "$" + df.format(price1 - .15 * price1));
  
             } else if (discountPercentage &gt;= 10){
  
             JOptionPane.showMessageDialog(null, " The discounted price is: " + "$" + df.format(price1 - .10 * price1));
  
                                              }
                                  }
  </code></pre>
  
  <p>Thanks</p>