For this assignment, you will implement a Screen class, an abstraction of the contents of a screen. You will also write a client of that class.
This assignment will emphasize the mechanics of implementing a class, and using that class to perform some larger task. It will also emphasize code reuse; points will be deducted for unnecessary replication of code to achieve similar functionality.
screen.h
: the
specification for the screen class. This file contains enough information
for you to understand what the member functions you're writing need to do.
Note that you are permitted to modify this file, in particular
to add the appropriate data members to store screen data. You may also
choose to add
your own private "helper" functions to the class. But you may not
change the specification! That means that you may not modify anything
declared in the public portion of the class.
You will also provide two files, screen.cpp
which implements
the class specified in screen.h
, and main.cpp
which implements the client of the Screen class.
A code outline for the client is privided as
main.cpp
. The client you will
write should read commands from standard input and execute them. The
commands to be accepted are:
load BLAH.SCREEN
input.txt
if you are unclear
on the format of the commands.
Many of these commands can fail because of bad parameters. You should know when things fail because the method calls on the screen instance should return 'false'. If this happens, you should print the string "Error." to the console, abort the operation, and continue processing commands.
You can assume that input to your interpreter is well formed, i.e., each command line has a valid command and an appropriate number of parameters.
mandel.cpp
.
When you're finished writing your solution, you can use the electronic turn-in form to submit it. Follow the instructions on that form (especially with regards to file naming conventions), print the receipt, and submit the receipt at the start of section, Tuesday, July 14th, 1998. For full credit, you must turn in electronically, print the receipt, and hand in that receipt in your section. You may also be able to drop your receipt in the drop box located on the first floor of Sieg hall, across from room 127. More details on this will follow.
If you need help with the lab environment or the online resources, go talk to a consultant in the IPL.
If you can't make progress in the actual assignment, please talk to the instructor or a TA. They are available during posted office hours, and sometimes by appointment. They will also occasionally help you out over email. You are invited to seek help from any available TA, not just your own.
You can discuss the assignment in general terms with other students. You
can ask general questions on the student discussion list for this course,
cse143@cs
. But any code you write must be your own.
For more details about what is and is not allowed, see the
Software hygiene page.