title: Simple Divison for Calculator not working
body: <p>I'm Trying to make a calculator that will figure in tax, tip, and splitting between multiple people, but the last feature isn't working and I can't figure out why. I know it will probably be a simple fix but I'm new to Java so I just can't find it. Note: this is my first actual Java program so please be understanding with my probably obvious mistake.</p>
  
  <pre><code>import java.util.Scanner;
  import javax.swing.JOptionPane;
  
  public class TaxFinder { 
  
       static Scanner scan = new Scanner(System.in);
      public static double priceD, taxD, totalTax, total, priceTipped, pricePP;
      public static int peopleI;
      public static String price, tax, people, ifTip, tip, ifSplit;
  
      public static void main(String args[]){
  
          ifTip = JOptionPane.showInputDialog("Was your purchase in a restaurant?");
  
           if (ifTip.equalsIgnoreCase("yes")){ 
               price = JOptionPane.showInputDialog("What was the cost of your bill ($)?");
               priceD = Double.parseDouble(price);
  
               tax = JOptionPane.showInputDialog("What is your tax rate (decimal)?"); 
               taxD = Double.parseDouble(tax);
  
               tip = JOptionPane.showInputDialog("Do you want to tip 5, 10, 15, or 20% ?"); 
  
               if (tip.equals("5")){ 
                   priceTipped = priceD * .05;
               }
  
               else if (tip.equals("10")){ 
                   priceTipped = priceD * .1;
                   //System.out.println("Your price tipped is " + priceTipped);
               }
  
               else if (tip.equals("15")){ 
                   priceTipped = priceD * .15;
               }
  
               else if (tip.equals("20")){ 
                   priceTipped = priceD * .2;
               }
  
               totalTax = priceD * taxD;
               total = priceD + totalTax + priceTipped;
  
           } 
  
           else if (ifTip.equalsIgnoreCase("no")){ 
               price = JOptionPane.showInputDialog("How much did your purchase cost ($)?");
               priceD = Double.parseDouble(price);
               tax = JOptionPane.showInputDialog("What is your tax rate (decimal)?");
               taxD = Double.parseDouble(tax);
  
           totalTax = priceD * taxD;
          total = priceD + totalTax;
           }
  
          JOptionPane.showMessageDialog(null, "Your total is: $" + total, "Shopping Calculator", JOptionPane.PLAIN_MESSAGE);
  
          ifSplit = JOptionPane.showInputDialog("Are you splitting the cost with other people?");
  
          if (ifSplit.equalsIgnoreCase("yes")){ 
              people = JOptionPane.showInputDialog("How many people including you?");
              peopleI = Integer.parseInt(people);
  
              pricePP = total / peopleI; 
              JOptionPane.showMessageDialog(null, "The total is $" + total + " per person", "Shopping Calculator", JOptionPane.PLAIN_MESSAGE);
  
              JOptionPane.showMessageDialog(null, "Have a nice day!", "Shopping Calculator", JOptionPane.PLAIN_MESSAGE);
          } 
  
          else if (ifSplit.equalsIgnoreCase("no")){ 
              JOptionPane.showMessageDialog(null, "Have a nice day!", "Shopping Calculator", JOptionPane.PLAIN_MESSAGE);
          }
      }
  }
  </code></pre>