Activities to Celebrate your Independence

  1. Implement a JUnit test class for the PureStack interface with a @BeforeEach method that creates a Stack object. You may wish to reference the ListTest class as a model.
  2. Implement a @Test method for push(E) method.
  3. Implement a @Test method for isEmpty() method.
  4. Implement a @Test method for peek() method.
  5. Implement a @Test method for pop() method.
  6. Implement a LinkedStack<E> class that implements the PureStack interface. The class must have a single attribute: Node<E> top that points to the top of the stack. The Node<E> class should have two attributes: E value and Node<E> next.
  7. Modify the test class to test your LinkedStack<E> implementation.