CS 162 Fall 2001 Assignment 3 Revised – Classes 100 points
Assigned: 09/17/2001
Due: 09/24/2001 at the start of class.
Pre-Lab (Do Before Lab): Think about the necessary structure and behavior for the object class. Bring an empty (or nearly empty) disk.
Pairs: You may work in pairs if you want. Note, during the course of the semester, you cannot pair with any one person more than twice. If you work in a pair, turn in ONE copy that is the work of both of you, with both of your names on it. Each member of the pair will receive the same grade for that lab. In such a partnership, students must share as equally as possible the work and learning. Working together with truly shared effort and learning can be a positive experience. However, simply giving/receiving code from someone defeats the learning process. If substantial parts of a program are taken from non-partners, that is plagiarism. The copier and copyee will each receive a zero.
Main Assignment:
Imagine
that your computer has radio capabilities (for local radio, not over the
Internet) and that you are writing a program to enable a user to control the
radio. We will be writing a class definition for the radio, and writing a class
implementation (.cpp), and writing a main function that demonstrates that the
class works correctly. Before lab, think about the necessary structure and
behavior of a radio. You may want to look at one and consider its controls –
your program would be providing users a way of controlling the radio. To keep
this relatively simple, think of a relatively simple radio. Make sure your main
function demonstrates that all of the capabilities of the class work. Since I
want you to plan how to best test your class, there is no sample interaction
below.
Hand-in:
1) Listing of the .h file and the two
.cpp files. Name the file with main in it yourlastname3.cpp
2) Disk with your .h, two .cpp and .exe
files.
Miscellaneous:
1)
Remember comments. In particular, function prototypes should have comments
telling what they will do: Also make sure you put YOUR NAME and e-mail address
in comments at the beginning of the file (especially important since two of
your files in this case should probably match your class name (rather than
being yourlastname3.h).