[ ../lab06/ ]
[ ../lab08/ ]
You can do this lab using a graphic editor
or in a terminal using vi as you wish.
Login. Change directory to cs201.
Make a new directory lab07 and
change directory to it.
Perform all the exercises in this lab under this directory.
[ test.Counter.cpp ]
[ test.Circle.cpp ]
Try to compile and run "test.Counter.cpp". Does it work?
Does it fail? If so, fix it!
Add a new function to the Count class and add statements that test it.
The header for the function is
void setValue(int v); // sets value to v
and a suitable test is
assert(c.getValue() == 5 );
Add any other test you like... then add the function definition
(fill in the blanks) and make it work.
Try to compile and run "test.Circle.cpp". Does it work?
You will need a calculator -- our machines have one: Activities -> Applications -> Accessories -> Calculator, or you can use Google in your browser!
How does it fail? Fix it (the error is subtle, be thoughtful)!
Finish all the experiments and get an a A.
. . . . . . . . . ( end of section CSci201 Laboratory 07 -- Classes) <<Contents | End>>
- Gnu::="Gnu's Not Unix", a long running open source project that supplies a
very popular C++ compiler.
- TBA::="To Be Announced", something I have to do.
- TBD::="To Be Done", something you have to do.