I have been playing around with this project for a long time and need to do well to pass the class. I have to do these things
Interaction Defined
1. Start up by clearing the screen in a random basic color, then waiting for a keystroke. (5 points)
2. Wait for a keystroke (only from the list below), then continuously perform the action associated with that keystroke until another key is pressed:
Keypress
Action
c
Pressing “c”, clear the screen to a “white” color. (5 pts)
r
Pressing “r”, clears the screen to a random color. (5 pts)
1
Pressing “1” (the number one), will draw continuous randomly-placed points in random colors. (10 pts)
2
Pressing “2”, will draw continuous random-lengthed lines in random colors. (10 pts)
3
Pressing “3”, will draw continuous random-sized circles in random colors. (10 pts)
4
Pressing “4”, will draw continuous random-sized rectangles in random colors. (10 pts)
e
Pressing “e”, will end all drawing until the next “1”, “2”, “3”, “4”, or “5” is pressed. (5 pts)
f
Pressing “f”, will toggle the “fill-mode” of the circles and rectangles. So for example, if I press “3”,
random empty-circles will be drawn in random colors. If I then press “f”, then any new circles drawn
should be filled with the same random color. If I then press “f” again, then any new circles drawn will be
empty. The key “f” acts as a toggle (an on-off switch) for filling new shapes being drawn. (20 pts)
5
Pressing “5”, will draw random letters from “A” to “Z” on the screen. (10 pts)
It is DUE TONIGHT! Please help me with my coding and you will save my life!