CSCI 1300 Computer Science 1: Programming
Spring 2004
Karl Winklmann

 
 

Assignment 2: “Moving Things Around”

Tuesday, January 27, 2004

Due: Wednesday, February 11, 2004

 
 
 


Project description form | Contents | Schedule and syllabus | Grading policy | People | Programs | MSDOS | Emacs | News archive | Dora (Assignment submission) | www.cplusplus.com | ~main/cs1300/doc/bgi

Write and test functions for these tasks:
  1. Drawing the perimeter of a square, similar to what the BGI function circle does for circles;
  2. Filling the inside of a rectangle with color, similar to what the BGI function fillellipse does for ellipses and circles;
  3. Testing whether two points on the screen are close enough to each other so that when the mouse is clicked at one point and (the center of) a rectangle is at the other point you want to regard the mouse as having clicked that rectangle.

If rectangles are not what your project needs choose some other shape.

The testing needs to be done by a main program that allows the user to try out these functions. It needs to allow the user to move such a shape around, thereby testing the drawing functions, and needs to give a menu of valid choices when the user types something that is not a valid choice.

Start from any program that has been posted on the class web site.

Bring questions to class.

 


© 2004 Karl Winklmann 5:53 PM, Thursday, April 29, 2004