Call
(317)643-0663
for consultation
Experience Programming
.
Home
Pricing
About
Contact
Android Development Example: Children's Calculator
Calculator Class
.
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!
Contact Us Today!