Question: Complete the implementation of the LinkedStack class by implementing the peek(), isEmpty(), size() and toString() method. Design and create a class named Painting. Test all
-
Complete the implementation of the LinkedStack class by implementing the peek(), isEmpty(), size() and toString() method.
-
Design and create a class named Painting.
-
Test all the methods in the Painting class as well as those in LinkedStack. You must test the Painting methods through objects on the on the Stack, not as an object itself.
-
Include Javadoc in StackInterface, and generate Javadoc so that you have the doc folder in your project.
-
Use the logically correct packaging structure to group your classes.
-
Implement the toString method of StackInterface correctly. When used, it should print out the top element first and the bottom element last. Must test the toString method several times to show that it is not obliterating the stack.
LinkedStack Class
package stack;
import exception.StackException;
public class LinkedStack
public void push(T element) { LinearNode
StackException Class
package exception;
public class StackException extends RuntimeException { public StackException(){ super("The stack is empty"); } public StackException(String msg) { super(msg); }
}
StackInterface class
package stack;
import exception.StackException;
public interface StackInterface
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
