You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
539 B
Java
22 lines
539 B
Java
public class PowerOf implements MathProcessing {
|
|
|
|
private String formattedOutput;
|
|
|
|
@Override
|
|
public String getKeyWord() {
|
|
return "power";
|
|
}
|
|
|
|
@Override
|
|
public String doFormatting() {
|
|
return formattedOutput;
|
|
}
|
|
|
|
@Override
|
|
public double doCalculation(double leftVal, double rightVal) {
|
|
double product = Math.pow(leftVal, rightVal);
|
|
formattedOutput = leftVal + " Has Been Raised To The Power Of " + rightVal + " Which Results In: " + product;
|
|
return product;
|
|
}
|
|
}
|