// This is an unfinished class of objects representing stacks of // elements of type int. public class Stack { private const int MAX = 1000; // Maximum height of a stack. private int [ ] contents; // Holds contents of the stack. private int ht; // Holds height of the stack. public Stack() { contents = new int[MAX]; ht = 0; } public int height() { } public int top() { if (ht != 0) return contents[ht - 1]; else throw new Exception("Stack is empty."); } public void push(int x) { if (ht != MAX) { contents[ht] = x; ht = ht + 1; } else throw new Exception("Stack is full."); } public void pop() { } public void reset() { } public string contentsToString() { } }