Computer Science 210
Data Structures

Fall 2017, Siena College

Programming Project 4: P.S.: It's Just a Stack
Due: 4:00 PM, Tuesday, November 21, 2017

This programming assignment is described in Section 10.5 of Bailey. You will learn about the PostScript language, and gain experience using stacks and making use of an existing partial implementation.

You may work alone or in a group of two or three on this project. Of course, collaboration with your partner(s) is unrestricted. You may discuss the assignment with your classmates and give and receive some help, but your submission must be your own work (or that of you and your teammates, if you choose to form a group).

This will be graded as a programming assignment, so be sure to refresh your memory about the submission guidelines.

Getting Set Up

You will receive an email with the link to follow to set up your GitHub repository ps-project-yourgitname for this Programming Project. One member of the group should follow the link to set up the repository on GitHub, then that person should email the instructor with the other group members' GitHub usernames so they can be granted access. This will allow all members of the group to clone the repository and commit and push changes to the origin on GitHub.

Please answer lab questions in the README.md file in your group's GitHub repository.

Before we meet for lab on Wednesday, each group should create and clone the starter repository. Familiarize yourself with the three given classes and make sure you understand how they work, especially how you would use them. Also, carefully read the lab description in the text and on this page. You are certain to have questions, but hopefully you will think enough about this project before this week's lab, so that many of those questions can be addressed during our lab meeting.

A PostScript Interpreter

Your task is to develop the Interpreter class. Start by developing a sketch of this class. Interpreter is where you will process the tokens being delivered to your interpreter by the provided Iterator class. You are strongly encouraged to discuss your sketch of this class with your instructor during lab or by email for comment and discussion before you begin significant implementation.

Notes and Guidelines

In addition to everything in the Bailey lab description, keep the following in mind while completing your program.

Bonus Opportunity

For 5 bonus points, you can implement procedures as described in thought question 3. If you design everything else properly, this should be almost a trivial extension.

For another 5 bonus points, you can implement the if operator as described in thought question 4.

Related Questions

Note: one word or one sentence answers are not sufficient here for full credit. Please be thorough and justify your answers.

Question 1: Answer thought question 1 from Bailey p. 249. (3 points)

Question 2: Answer thought question 2 from Bailey p. 249. (4 points)

Question 3: Answer thought question 5 from Bailey p. 250. Note: while you don't have to do questions 3 and 4, you need to read and understand them to be able to do 5. (5 points)

Submitting

Your submission requires that all required deliverables are committed and pushed to the master for your repository's origin on GitHub. That's it! If you see everything you intend to submit when you visit your repository's page on GitHub, you're set.

Grading

This assignment is worth 60 points, which are distributed as follows:

> FeatureValueScore
Interpreter program design and style 8
Interpreter program documentation 10
Interpreter correctness 30
Question 1 (Thought Question 1) 3
Question 2 (Thought Question 2) 4
Question 3 (Thought Question 5) 5
Bonus opportunity 1: procedure support (5)
Bonus opportunity 2: if support (5)
Total 60

The program design grade will be based on the design choices you make in the implementation of the Interpreter class. The program style grade will be based on code formatting and approriate use of Java naming conventions. The program documentation grade is, of course, based on the comments you provide. The program correctness grade is based on how well your program meets the functionality requirements.