public class Calculator {
//sum function, return the sum of two given parameters
public int sum(int numA, int numB){
return numA + numB;
}
//subtraction function, return the subtraction of two given parameters
public int sub(int numA, int numB){
return numA - numB;
}
//multiplication function, return the multiplication of two given parameters
public float multiply(float numA, float numB){
return numA * numB;
}
//division function, return the division of two given parameters
public float division(float numA, float numB){
return numA / numB;
}
}
如果知道了以上方法,我想输入,比如num的三次方,我该怎么继续写