Author: Joyce Buda


CMSC 350 Project 11. SpecificationPart 1
Design, implement and test a generic stack class StackUMUC (this name is chosen as to avoid confusion with similar classes defined in JDK). Use an array or an ArrayList as support data structure.
For StackUMUC<T> class, implement the following methods:StackUMUC(int) // class constructorvoid push(T)T pop()T peek()boolean isEmpty()String toString()
Write a driver program to test the class StackUMUC. Test the class for the JDK types Integer and String and for the user defined type Point. The class Point represents 2D Cartesian points having x and y as instance variables, a default constructor and a constructor with arguments, and the methods getX, getY and toString. The driver will be implemented as a separate class TestStackUMUC. 
Part 2
Use the class StackUMUC to design, implement and test a Lisp verifier program that checks the proper balance of the parenthesis in Lisp programs. As an example of List code, the program fragment below defines the function factorial. 
The Lisp verifier program will be implemented using a Java Swing GUI. The GUI defines an input text area where the user should enter the Lisp program, an output text area where the program will show the results and a button Verify to start the verification process. In the output text area the program will display a message indicating whether the parenthesis of the verified program are well balanced or not as well as the number of open parenthesis and the number of closed parenthesis. If the parentheses are not well balanced the program will give appropriate indications to locate the error
The programs should compile without errors.
Note. Lisp is a functional programming language, which uses fully parenthesized Polish prefix notation. More about Lisp programming language you can find here: https://en.wikipedia.org/wiki/Lisp_(programming_language)
Other Lisp functions you can use for testing your program can be found here: https://www.cis.upenn.edu/~matuszek/LispText/lisp.html

See More
Try a College Course Free

Sophia’s self-paced online courses are a great way to save time and money as you earn credits eligible for transfer to over 2,000 colleges and universities.*

Begin Free Trial
No credit card required

26 Sophia partners guarantee credit transfer.

226 Institutions have accepted or given pre-approval for credit transfer.

* The American Council on Education's College Credit Recommendation Service (ACE Credit®) has evaluated and recommended college credit for 21 of Sophia’s online courses. More than 2,000 colleges and universities consider ACE CREDIT recommendations in determining the applicability to their course and degree programs.