AP Computer Science: CMU Graphics Students

Total Page:16

File Type:pdf, Size:1020Kb

AP Computer Science: CMU Graphics Students

AP Computer Science: CMU Graphics Students May 10, 2001

TODAY IN AP COMP SCI:

 I will walk you through the “manual” for the CMU graphics package and the code for the demo programs.  You will attempt the following program, and hopefully turn it in by the end of class on Friday:

Program due at the end of class on Friday: Create a program that draws a rectangle on the blank (white) canvas, with a black outline/border. Make it so that when the mouse is in the interior of the rectangle and the mouse is clicked, the rectangle is filled in with a random color. If the mouse is outside of the rectangle and is clicked, nothing happens.

Next week, by Tuesday, you will decide on a project to do for the last two weeks of class. I will try to bring in examples and suggestions tomorrow. You may choose to work alone or with a partner, but you must inform me of your decision on Tuesday, when you tell me what project you will be working on.

Your project must:  Have at least three graphics objects that are used during the program’s run.  Respond to a mouse click, by having some sort of action happen when the mouse is clicked.  Display text on the screen on at least one part of your program.  Animation is difficult and optional.

Recommended publications