Windows NT Systems Programming: Spring 2000
[ Home | Syllabus | Course Notes | Assignments | Search]
Assignment 1: Click the Center
Description: This program tests the
ability of the hand/eye coordination of the user. When the program is started it will
display a circle in a random position on the screen. The user must click the mouse as
close to the center as possible. The program will then move the circle to another randomly
chosen place and the user will again click the mouse on the center. The program will
measure the accuracy of the clicks measured as the distance from the click to the center
of the circle. It will display the average distance from the center as the game
progresses.
Due: Jan 27.
FUNCTIONAL REQUIREMENTS:
- For displaying the circle, divide the screen's width by 10. This defines the diameter of
the circle to be displayed.
- The diameter of the circle will change as the window is resized.
- The circle must be displayed in its entirety.
- After each mouse click, move the circle to another, randomly chosen, position on the
screen.
- You must display the current average distance of the user's mouse click from the center
of the circle.
IMPLEMENTATION REQUIREMENTS:
- You must use MFC objects for the window and application and must use the message
handling architecture of MFC.
- The current diameter of the circle must be stored as a data member of the View object.
- The current position of the circle must be stored as a data member of the View object.
- Any data needed to calculate the average distance from the center must also be stored as
data members.
Copyright chris wild 1999/2000.
For problems or questions regarding this web contact [Dr.
Wild].
Last updated: January 17, 2000.