3. Tips
•
People who drew pictures made fewer mistakes!
•
You can run the code to verify!
•
Remember: the width and height arguments are
not from center; they are total width & height!
•
Review: weighted probabilities
6. System Memory
The Stack
Global Variables
Code
3b. “Pop” local variables
3a. “Push” local variables
2. Load global variables
1. Load the code into memory
9. Quiz Conditionals, & Loops
2!
Variables,
•
Primitive Types (int, float, boolean)!
•
Variable Declaration and Initialization!
•
System Variables (width, height, mouseX, etc.)!
•
The random() and constrain() functions!
•
Conditional Statements (if, else-if, else)!
•
Relational Operators ( <
•
Logical Operators ( &&
•
For Loops ( for( int i = 0; i < 15; i++) {} )
>
||
<=
>= != == )!
! )!
10. For next time…
•
Read and respond to your proposal feedback!!
•
Read Shiffman, p. 101–107 (Functions I)!
•
Quiz 2 – Variables, Conditionals, & Loops