Question: 3rd: Design and implement your own stack data structure in C LANGUAGE by implementing the following interface: (REPLACE AND COMPLETE THE CODE BELOW USING C

3rd: Design and implement your own stack data structure in C LANGUAGE by implementing the following interface: (REPLACE AND COMPLETE THE CODE BELOW USING C LANGUAGE DO NOT USE JAVA)

// StackInterface.java public interface StackInterface { public void push(E j) throws StackFullException; public void pop() throws StackEmptyException; public E top() throws StackEmptyException; public boolean isEmpty(); 26 public boolean isFull(); public int size(); } // Starter Class: MyStack.java public class MyStack implements StackInterface { @Override public void push(Object j) throws StackFullException { #TODO: write your implementation } @Override public void pop() throws StackEmptyException { #TODO: write your implementation } @Override public Object top() throws StackEmptyException { #TODO: write your implementation return null; } @Override public boolean isEmpty() { #TODO: write your implementation return false; } @Override public boolean isFull() { 27 #TODO: write your implementation return false; } } // Exceptions: // StackEmptyException.java public class StackEmptyException extends RuntimeException { public StackEmptyException(String s) { super(s); } } // StackFullException.java public class StackFullException extends RuntimeException { public StackFullException(String s) { super(s); } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!