University of Nevada Las Vegas
Howard R. Hughes College of
Engineering
School of Computer Science
My Home Page
UNLV CS Fall 2009 Assignment 3

CS 302 Assignment 3
Due date: Thursday, Septembler 10, 2008, 8:30 AM in class.
All written assignments must be handwritten
(not typed or printed from a
computer file) in your own handwriting, on 8.5 by 11 inch paper, or on A4
paper. Write your name on each sheet, and do not fold the pages or crimp the
corners. (You may use a paper clip or a staple.)
Turn the pages in to me or to the graduate assistant on the due date.
Work the following problems from your textbook:
Problem 2.7 on pages 64-69.
Add just two more code fragments to 2.7,
namely (7) and (8).
Consider Problem 3.22 on page 110 of your textbook.
I do not want you to write the code. This is a hand-written assignment.
Instead, pretend that you have written the code, and that the input
to your program is this file.
As your program runs, the stack will grow and shrink. Show the contents
of the stack at each step, and show the output of your program.
This is not a programming assignment, meaning that you are
not to turn in code. You should draw the table requested in 2.7(b)
by hand, but not turn in an electronic output of your code.