I am implementing a sparse matrix based on the Stack
class, and I'm getting the following error:
Sparse.java:6: Sparse is not abstract and does not override abstract method pop() in Stack
public class Sparse implements Stack {
Here is the code snippet in question:
public class Sparse implements Stack {
static int matrix[][] = new int[6][6];
public static int[][] Random() {
Random rand = new Random(seed);
rand.nextInt(100);
for (int i = 0; i < matrix.length; i++) {
for (int j = 0; j < array[0].length; j++) {
matrix[i][j] = rand.nextInt(100);
}
return matrix;
}
}
}
Any and all help would be appreciated. Thank you.