A Basic Calculator
In this project, you will use classes, methods, and objects to create a simple arithmetic calculator. The calculator will be able to:
class BasicCalculator {
int add(int a, int b) {
return a + b;
}
int sub(int a, int b) {
return a - b;
}
int mult(int a, int b) {
return a * b;
}
int div(int a, int b) {
return a / b;
}
int mod(int a, int b) {
return a % b;
}
}
Comments
Leave a comment