CS
14 - Lab 5
CS 14
Homepage
Mystery Program
In this lab you will be given a compiled program, as well as the
sample linked list implementation. You are
to write a program that behaves as similarly to the mystery program as
possible.
The Assignment
Download these two files:
- mystery - This is the mystery program. To
set the permissions on it so that it is executable, run the command
chmod +x mystery
after saving it to your lab directory.
- list.cc - This is code for a sample linked list
implementation. You may reuse any of this code that you like for
this week, although you don't have to.
Hints:
Point Breakdown For Lab Assignment
You demo your solution in lab. The TA will look at the output of your solution
to verify that it is the same as the mystery code and then will verify
that you did indeed write the code to do this. Remember, to receive credit
for this lab, you MUST turn the code in online. If you do not turn in
your code online, you will lose points for your lab. All code must be turned
in online for archival purposes. Your lab is due 1 hour after the end
of your scheduled lab time.
- 2 points - Attendance is, as always, worth 20% of your lab grade.
- 7 points -
Create a file called "solution.cc". In that file, duplicate the
functionality of the mystery program. Ideally, for every input your
program and the mystery program will produce the same results. You may
get partial credit if you get some of the correct functionality. NOTE:
you MUST reproduce the exiting seg fault as well.
- .4 points - There are 2 secret commands. Identify them and
implement them in your own program. (You might want to google for
"binary strings unix")
- .2 points - What data structure is this program implementing?
(The answer is not linked-list.) Write your
answer in the header of solution.cc.
You must write the answer there or you will not get points. You
may not say this answer verbally during checkout because you will give the
solution away to the other lab groups.
- .4 points - Do not include the linked-list operations from
list.cc in your solution.cc file. Create an appropriate header file
and a Makefile that builds both of these .cc files into .o files and
links them.
- Deductions:
- -5 points - Turned into the wrong lab section.
- -1 point - No name on work turned in
- -5 points - Code not turned in at all. This deduction also applies to
turnins that do not contain a the partners name (only the name that is not
on the turnin will have 5 points deducted. The person that actually turned
the code in will only have 1 point deducted if their name is not on the
turnin).
- -5 points - If your currently assigned partner is in lab and you do not
work together.
© 2003 UC Riverside Department of Computer Science &
Engineering. All rights reserved.