TEST 2 topics and review Flashcards

1
Q

What is the graphics console?

A

Window on screen where graphic images are drawn.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

graphics commands of:
Stroke, fill, line, ellipse, rect, quad, and triangle.

A

stroke(r, g, b);
fill(r, g, b);
line(x1, y1, x2, y2);
ellipse(x, y, w, h);
rect(x, y, w, h);
quad(x1, y1, x2, y2, x3, y3, x4, y4);
triangle(x1, y1, x2, y2, x3, y3);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

steps to animate an object

A
  1. declare a variable outside draw() for values that would move during animation.
  2. draw shape using the variables you need to change
  3. modify variables using increments and decrements
  4. call procedure in draw
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

4 increment/decrement operators

A

x++; increase x by 1
x–; decrease x by 1
x+=#; increase x by #
x-=#; decrease x by #

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

3 things needed to write a for loop

A
  • starting value
  • stop value
  • increment/decrement
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Procedure name rules

A

1) starts with void keyword
2) must start with letter
3) can have letters, numbers, and underscore.
4) need matching parenthesis and curly brackets defining procedure.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly