KRHS Internet Lesson

Teacher Name:Mr. Rung                          Date of Lesson: January

Course Name: C++                    Lesson Name: Chap 12.3c

Student Name

Password


Objective
To complete the workbook assignments


Primary Focus
Suppose you are designing a program that will provide a timer on the screen of your computer. The timer should allow the user to start, stop, and reset the timer. After considering how the timer might be designed using the object-oriented paradigm, answer the questions below.

Site Links
Course Home Page

Additional Resources

Site Links


Question #1

What data must be stored inside the timer object?


Question #2

What messages will be necessary in order to communicate with the timer object?


Question #3

Sketch a possible user interface for the program. If your user interface caused you to rethink the messages
necessary for the object, update your answer to question 2 above. (describe the sketch below)


Question #4

Write a class definition for your timer class in the space provided below. Do not write the implementation.
class timer {


};


Question #5

Write a short program that uses the timer class. The program should instanciate a timer object, reset the timer, start the timer, stop the timer, and reset the timer again. If your object accepts additional messages, write statements to use those methods as well.