CSC 221: Computer Programming I
Fall 2006

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) variable scope primitive vs. object types, .equals vs. == String methods: length, charAt, indexOf, substring, equals, compareTo, ... Conditional control cascading if-else statements logical connectives while loops controlled by boolean expression, condition-driven danger: infinite (black-hole) loops % operator for loops used for counter-driven applications equivalent to while loops simulations: dice, dot race, volleyball