title: Java Tip Calculator for newbie
body: <p>I hope I'm posting in the right place.</p>
  
  <p>I'm pretty new to Java (meaning this is only my third program besides 'hello world').</p>
  
  <p>I have a tip calculator I'm working on for an assignment. I'm not getting an 'error' as such,
  but the method for splitting the bill always seems to think each customer pays 'infinity'.
  I have my program set up in two classes: tipCalc1 and tipCalc2 (no points for originality of course).
  The program appears to run without issue besides the 'infinity' issue.</p>
  
  <p>Here's what I have so far. Any assistance appreciated, thanks.</p>
  
  <pre><code>***TipCalc1 Class:***
  
  import java.util.Scanner;
  
  public class Tipcalc1
  {  
      public static void main(String[] args)
      {
          System.out.println("Welcome to Tip Calculator! ");
          TipCalc2 Calculator = new TipCalc2();
          System.out.println("Please enter the bill amount: ");
          TipCalc2.calBill();
          System.out.println("What percentage would you like to tip?: ");
          Calculator.percTip();
  
      }
  
  }
  
  
  ***And the tipCalc2 class which does the dirty work:***
  
  import java.util.Scanner;
  
  public class TipCalc2
  {
      static double bill;
      double tip;
      double total;
      double split;
      double splitPrompt;
      double Y;
      double N;
      double billPerPerson;
  
          static Scanner scan = new Scanner(System.in);
          public static void calBill()
          {
               bill = scan.nextDouble();
          }
  
          public void percTip()
          {
               tip = scan.nextDouble();
              if(tip&lt;1)
              {
                  total = bill * tip;
              }
          else total = bill * (tip/100);
          System.out.println("Your total is: " + total);
          Split();
          }
  
  
          public void Split()
          {
          System.out.println("Would you like to split the bill? ");
          System.out.println("Enter 1 for YES or 0 for NO: ");
  
          splitPrompt = scan.nextDouble();
          if(splitPrompt == 0)
          {
              System.out.println("Your total is: " + total);
              System.out.println("Thankyou. Goodbye.");
              System.out.println("End Program");  
          }
          if(splitPrompt == 1)
          {
              System.out.println("How many ways would you like to split the bill? ");
              splitPrompt = scan.nextDouble();
              billPerPerson = total / split;
              System.out.println("Each person pays: " + billPerPerson);
              System.out.println("Thankyou. Goodbye.");
              System.out.println("End Program.");  
  
          }
          else System.out.println("Invalid Entry");
          }
  
      }
  </code></pre>