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:

  1. For displaying the circle, divide the screen's width by 10. This defines the diameter of the circle to be displayed.
  2. The diameter of the circle will change as the window is resized.
  3. The circle must be displayed in its entirety.
  4. After each mouse click, move the circle to another, randomly chosen, position on the screen.
  5. You must display the current average distance of the user's mouse click from the center of the circle.

IMPLEMENTATION REQUIREMENTS:

  1. You must use MFC objects for the window and application and must use the message handling architecture of MFC.
  2. The current diameter of the circle must be stored as a data member of the View object.
  3. The current position of the circle must be stored as a data member of the View object.
  4. 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.