We are providing a starting point for your program, namely the program shell I talked an\bout in class. You can obtain this program shell and a working solution executable by copying the following files:
~mc38/labs/many-clocks/many-clocks.cc
~mc38/labs/many-clocks/solution
The file many-clocks.cc will compile and display a message
telling (briefly) you what to do. You should also probably run
solution so that you know what your goal is.
Check-offs (2 points): When we check you off, we'll verify that you have:
angleOfHourHand, and an appropriately written
Makefile.
As the book describes, documentation involves comments at the head describing what the program does, and a brief comment at the head of each procedure saying what the procedure computes. Since you'll choose clear variables and procedure names, each comment can be quite short. Remember to state any preconditions, if there are any.
angleOfMinuteHand,
radialSegment, and drawTick, including
testing and documentation.
You can demonstrate testing either by code in your main (which you'll later remove) or set's in your gdb buffer.
drawClock and
drawLabeledClock, including testing and documentation.
main so that the program does what it should.
man -k sleep, there are a couple relevant entries:
sleep (1) - delay for a specified amount of time sleep (3) - Sleep for the specified number of secondsOne of these, from Chapter 1 of the on-line manual, is a Linux shell command, and the one from Chapter 2 is a
C library
command. To learn about the sleep from Chapter 3, type,
man -3 sleep
for (int i=0; i<50; i++)
cwin << Point (10,10);