Course Material
|
TEST 1 MATERIAL
Interaction and design
modular design
constant fields (final & static)
shared fields (static)
complex expresions
logical operators (&&, ||, !), remainder operator (%)
variable scope
nesting conditionals, cascading if-else
variables local to if/while block
Repetition and simulation
while loops
controlled by boolean expression, condition-driven
danger: infinite (black-hole) loops
for loops
used for counter-driven applications
equivalent to while loops
simulations: dice, volleyball, Pig
Design and text processing
object-oriented design principles
highly cohesive: each class/method maps to a single entity/behavior
loosely coupled: classes are largely independent, interact via methods
strings
objects vs. primitives, strings as objects
comparison using equals and compareTo
methods: length, charAt, substring, indexOf, toUpperCase, toLowerCase
Character static methods: isUpperCase, isLowerCase, isLetter, ...
StringUtils static methods
reverse, stripNonLetters, isPalindrome, findVowel, pigLatin, ...
|