1902hw5writeup

1902hw5writeup - CSci 1902 Homework 5(v2 Due April 8th 2010...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CSci 1902 – Homework 5 (v2) Due: April 8 th , 2010, 4:00pm (before class) Purpose In this group homework assignment, you will implement an arithmetic calculator from scratch. You will not be given any code to modify or add to. The purpose of this homework is to practice: Stacks Queues Postfix and Infix Notations Introduction If you are a frequent calculator user, you owe it to yourself to investigate the advantages of Reverse Polish Notation (RPN), commonly referred to as postfix notation. Reverse Polish Notation was developed in 1920 by Jan Lukasiewicz as a way to write a mathematical expression without using parentheses and brackets. Engineers at the Hewlett-Packard company realized that RPN could be used to simplify the electronics of their calculators at the expense of a little learning by the user. The first "calculator" to use RPN was the HP9100A, which was introduced in 1968, although this machine is now regarded by many as the first desktop computer. In 1972 HP adapted RPN for its first hand-held scientific calculator, the HP35. Some of the advantages of RPN calculators are the following: RPN saves time and keystrokes. You never have to account for the parentheses while doing calculations. The process is similar to the way you learned math on paper. You can see the intermediate results as you perform your computations rather than just the answer at the end. An intermediate result allows the user to check the results and correct errors more easily. It's easier to follow the stream of calculation. In this homework assignment, you will implement a calculator that evaluates postfix and infix expressions. Getting Started There are no files to download for this homework. You will be writing all of the code yourself. The name of your NetBeans project and class files are yours to create. However, your class files must be in the package csci1902.hw5 , and not the default package. Homework Submission Homework must be submitted electronically via the online-submission utility. You will find the link, “Submit Tool”, on the course website. Before submitting, create a questions.txt file in the top-level of your project directory. Include your names and X.500 IDs in this file as well as the answers to the questions in the Questions section of this write-up. Also, place your names and IDs in the @author tags in the header comments of each file you modify.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
NOTE: Please comment your code properly. Commenting will be graded! Create an archive containing your project. For your convenience, a build.xml file can be downloaded from the class website to replace the default NetBeans build.xml in the top-level of your project directory. With this file, you can run the following Ant command on an ITLabs computer in a Terminal from inside the top-level of your project directory to create the archive: ant package This will automatically create a ' <project name> .zip' file containing your project files. Note that the
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 10

1902hw5writeup - CSci 1902 Homework 5(v2 Due April 8th 2010...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online