title: Multiple class calculator
body: <p>I am trying to make a simple calculator using multiple classes.  I can make one in one class, but now I would like to try making one using two classes.  I am having trouble with calling some variables (fnum, snum, answer) from the OperationClass.
  If I run the program as it's written now I get 0 returned for the answer.
  I tried making the variables fnum, snum and answer in OperationClass public but that did not work.
  Also I tried public class OperationClass extends Calculator.  That did not work either.<br>
  I know i'm missing something very simple.  I just can't pin point it.  </p>
  
  <p><strong>Calculator Class:</strong></p>
  
  <pre><code>import java.util.Scanner;
  
  public class Calculator{
  
      public static void main(String[] args) {
  
          OperationClass operationObject = new OperationClass();
  
  
          Scanner input = new Scanner(System.in);
          double userInput;
          int userChoice;
  
          System.out.print("Please Enter The First Number: ");
          userInput = input.nextDouble();
          System.out.print("Please Enter The Second Number: ");
          userInput = input.nextDouble();
          System.out.println("Please Select Operation to Perform:");
          System.out.println("1-Addition");
          System.out.println("2-Subtraction");
          System.out.println("3-Division");
          System.out.println("4-Multiplication");
          userChoice = input.nextInt();
  
          switch (userChoice){
          case 1:
              operationObject.addition();
              System.out.println();
              break;
          case 2:
              operationObject.subtraction();
              break;
          case 3:
              operationObject.division();
              break;
          case 4:
              operationObject.multiplication();
              break;
          }
  
  
      }
  
  }
  </code></pre>
  
  <p><strong>OperationClass:</strong></p>
  
  <pre><code>public class OperationClass{
  
      double fnum, snum, answer;
  
      public void addition(){
          answer = fnum + snum;
          System.out.println(answer);
      }
  
      public void subtraction(){
          answer = fnum - snum;
          System.out.println(answer);
      }
  
      public void division(){
          answer = fnum / snum;
          System.out.println(answer);
      }
  
      public void multiplication(){
          answer = fnum * snum;
          System.out.println(answer);
      }
  }
  </code></pre>