UMUC CMSC 350 Project 1 complete solutions correct answers key
- Vpqnrqhwk
- Rating : 40
- Grade : A+
- Questions : 2
- Solutions : 1079
- Blog : 0
- Earned : $19352.58
UMUC CMSC 350 Project 1 complete solutions correct answers key
1. Specification
Part 1 Design, implement and test a generic stack class StackUMUC<T> (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 constructor void 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.
(defun factorial (n)
(if (= n 0) 1
(* n (factorial (- n 1)))))
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
2. Submission requirements Submit the following before the due date listed in the Calendar:
1. All Java source files. The source code should use Java code conventions and appropriate code layout (white space management and indents) and comments.
2. The solution description document <YourSecondName>_P1 (.pdf or .doc / .docx) containing: (2.1) assumptions, main design decisions, error handling; (2.2) test cases and two relevant screenshots; (2.3) lessons learned and (2.4) possible improvements. The size of the document file (including the screenshots) should be of 3 pages, single spaced, font size 12.
[Solved] UMUC CMSC 350 Project 1 complete solutions correct answers key
- This solution is not purchased yet.
- Submitted On 12 Jan, 2017 02:47:41
- Vpqnrqhwk
- Rating : 40
- Grade : A+
- Questions : 2
- Solutions : 1079
- Blog : 0
- Earned : $19352.58