As we continue our timer journey...

Better output

Up to this point in your journeyings of the wonderful world of C++ you have been using cout to do output. This is soooooo boring. WIBNIF we could make a 7-segment timer display? Lets try.

A 7-segment display looks like the following:

But before we can get an oject of type 7-segment display we need to first define a segment object. And not only do we need to define it, but we must make it general enough so that we could use it in many applications.

Lets look at a header file for our segement called segment.h

Lets examine the file segment.cpp

And how about a demo of our segment segmentTest.cpp

Now lets design another class sevenSegDisplay which is in the file 7seg.h

Now lets look at 7seg.cpp

Make sure you check out the driver 7segTest.cpp

Now lets make a class for a counter in file counterDisp.h

Now lets examine a test run of our new counter

See Demo counterDispTest.cpp

Now let's look at HMStimer.h

And we run HMStimer.cpp

The geometry involved in the timer is given below:

See Demo HMSTimerTest.cpp for test run of timer.

A few notes about Assignment #10

To Index Previous Next