Implement this API. You do not have to include javadoc comments. If you do not know the value of the constant, just choose the value yourself.
package eecs2030.test1;
/**
* Test 1 for EECS 2030E Lab 2.
*
* @author EECS2030E
*
*/
public class Test1D {
/**
* The number of slices in a large pizza.
*/
public final static int SLICES_LARGE = 10;
private Test1D() {
// empty by design
}
/**
* Computes the total number of slices in the given
* number of large pizzas. It is assumed that the
* number of pizzas is greater than or equal to zero.
*
* @param n the number of large pizzas
* @return the total number of slices
*/
public static int numberOfSlices(int n) {
return n * Test1D.SLICES_LARGE;
}
}
Save your file (it might be easiest to save the file in the same
directory as your Test1D.java file). Submit your answer
using the following command:
submit 2030 test1D answers.txt