Back to Examples
package com.example.childrencalculator;

public class Calculator {

  public static int returnAmount;

  public static int divideInput(int currentAmount, int buttonClicked){

    returnAmount = currentAmount / buttonClicked;
    return returnAmount;

  }

  public static int multiplyInput(int currentAmount, int buttonClicked){

    returnAmount = currentAmount * buttonClicked;
    return returnAmount;

  }

  public static int addInput(int currentAmount, int buttonClicked){

    returnAmount = currentAmount + buttonClicked;
    return returnAmount;

  }

  public static int subtractInput(int currentAmount, int buttonClicked){

    returnAmount = currentAmount - buttonClicked;
    return returnAmount;

  }

}
Back to Examples

Startup Discount
Small Business?
Contact us for an Enormous Discount!