import java.util.ArrayList;
import java.util.NoSuchElementException;

/** The K_ALStack class implements the <em>K_Stack</em> interface (a
 *  simple version of a Stack abstract data structure) using an ArrayList
 *  internally.
 *
 *  @author Alyce Brady (partially implemented in October 2025)
 *  @author Your Name
 *  @version The Date
 **/

public class K_ALStack<T> implements K_Stack<T>
{
  // Instance variable: Define internal ArrayList.  The 'top' of the stack
  // is the end of the list.
    ArrayList<T> internalList;

  // Constructor

    /** Constructs an empty stack.
    public K_ALStack()
    {
        // ADD CODE HERE !!!
    }

  // Implement methods from the K_Stack interface.

    /** {@inheritDoc}
     */
    @Override
    public int size()
    {
        // ADD CODE HERE !!!
    }

    /** {@inheritDoc}
     */
    @Override
    public boolean isEmpty()
    {
        // ADD CODE HERE !!!
    }

    /** {@inheritDoc}
     */
    @Override
    public void push(T item)
    {
        // ADD CODE HERE !!!
    }

    /** {@inheritDoc}
     */
    @Override
    public T pop() throws NoSuchElementException
    {
        // ADD CODE HERE !!!
    }

    /** {@inheritDoc}
     */
    @Override
    public T peekNext() throws NoSuchElementException
    {
        // ADD CODE HERE !!!
    }
 
    /** {@inheritDoc}
     */
    @Override
    public String toString()
    {
        return internalList.toString();
    }
}
