Ch. 1
- Terms like CPU, RAM, Disk
- Java Runtime Environment
- compile, bytecode
- Read book!
Ch. 2
- tracing, breakpoint, run, debug
- algorithms, pseudocode, implementation
- sequence, decision, loop
Ch. 3
- Basic computation: *, /, +, -, double vs. integer, constants
- Expression: something like x + y * z
- remainder operator: %
- Types: int, char, double, String
- floating-point vs. integer
- string constants, character constants
- named constant
- casting
- variable, declaration, initialization, assignment (statement)
- assignment with operator: +=, -=, *=, /=
- input statement, output statement, print statement, prompt
- increment, decrement statements: ++, --
- documentation, comments
Ch. 4
- decision: if, if/else
- boolean values: true, false
- else matched to closest unmatched if
- Using braces to control code
- indenting to show control
- while: while ( condition ) action
Exercises
- Compute volume of a sphere using 4/3 pi r3
- Compute xy for double x and integer y
- Show possible errors
- Trace by hand
- Read pairs of dice values, count number of throws to get to 7.
- Could rewrite this using do/while - see book
- Read names until user enters an empty name or presses cancel
- If user presses cancel, name will be set to special
symbol null (indicating no value)
- Count number of names entered
- Print "got tired?" if user pressed cancel