Test #1 - Drawing
Test Format and Review Page
PART ONE - CODING
(20 points)
During the first part of the test, you'll solve a programming chllenge by writing code in Processing. You will have up to 20 minutes to complete this section. There are FOUR possible challenges you might be given, determined randomly on the day of the test. You may not use any notes, but the challenges are provided to you in advance to practice.
The next class period will offer a redo opportunity for any students who did poorly on the original. On the redo, you'll be given a different challenge and can complete it for a maximum score of 80%. You will receive the second score, even if it is lower.
Challenge #1
Canvas size: 600 x 600
Background: Orange
A yellow circle with a diameter of 50 pixels that starts at a random position on the left side of the screen
It moves to the right side at a speed of 5 pixels per frame
Each time it reaches the right side of the screen, it appears at a new random position on the left side and increases its size by 40%
If this change would make the circle's diameter greater than 300, set the diameter to 50.
Challenge #2
Canvas size: 600 x 600
Background: Blue
A white circle with a diameter of 30 pixels that starts at a random position on the bottom of the screen
It moves to the top at a speed of 2 pixels per frame
Each time it reaches the top of the screen, it appears at a new random position on the bottom of the screen and increases its speed by 50%.
If this change would make the circle's speed greater than 32 pixels per frame, it is instead reduced to 2 pixels per frame.
Challenge #3
Canvas size: 600 x 600
Background: Pink
At the start of the program, a square is created at a random position on the screen. It has a random size between 10 and 100 and is assigned a random color.
The square should not be flashing; the color must stay constant.
When the user presses the mouse, the shape select a new random color, size, and position.
This can be done with either polling or event based methods.
Challenge #4
Canvas Size: 600 x 600
Background: Purple
At the start of the program, a yellow rectangle is created at the top left corner of the screen. It has a width equal to the screen width and height of 30 pixels.
Each frame, move the rectangle down by 2 pixels and reduce its width by 2 pixels.
When the rectangle reaches the bottom of the screen, move it back to the top of the screen and restore the width to the full width.
PART TWO - CONCEPTS
(30 points)
This test will be entirely on Schoology
It has a mix of multiple choice, matching, and true/false questions
This test has no redo allowed - your score is final
Binary, Bits, and Bytes
Binary
Bit vs. Byte
Processing
High Level vs Low Level Language
RGB Values
Be able to identify red, green, blue, gray, black, and white.
0-255 scale
Program Design
Algorithm
Abstraction
Syntax
Syntax Error vs. Logical Error
Statement vs. Block
Comments
Inline comment //
Extended comment /* */
Camel Case
Hard Coding
Conditionals
If / Else If / Else
Logical Operators (&&, ||, !)
Comparison Operators (<, <=, >, >=, ==, !=)
Truth Tables
DeMorgan's Laws
Functions
Function / Method
Header / Signature
Body
Parameter
Return value
Accessor vs. Mutator
Variables
Types: int, float, boolean
Scope
Local vs Global
Processing
Setup()
Draw()
Input Polling vs. Input Event
mousePressed
void mousePressed()
keyPressed
void keyPressed()
Random
Drawing
Shapes
Rectangle
Ellipse
Triangle
Colors
Fill
Stroke
Transparency
width and height