CSC 221: Computer Programming I
Test 2 Review
TEST 1 MATERIAL
overview & history: hardware vs. software, technology generations, ...
Java classes: private vs. public, fields, methods, constructor, local variables
Java statements: assignment, output, return, (internal & external) method calls
expressions: concatenation, arithmetic, precedence, mixed expressions, casting
conditionals: if statement, if-else, boolean expression
variables: fields vs. parameters vs. local variables
OOP and design
design principles, cohesion, coupling
simple graphics: Canvas, Circle, Square, ...
static fields, constants (final)
primitive vs. object types, .equals vs. ==
String methods: length, charAt, indexOf, substring, equals, compareTo, ...
cascading if-else statements
logical connectives (&&, ||, !)
controlled by boolean expression, condition-driven
danger: infinite (black-hole) loops
used for counter-driven applications
equivalent to while loops
simulations: dice, dot race, volleyball