Midterm #1 Topics
Computers
- Hardware, Software, CPU
- Source code,
compiler, byte code
- Different kinds of memory
Java
- Statements,
expressions
- Local variables
- Primitive variable types
- Code blocks
({})
- Naming conventions
- Constants, literals
- Variable scope,
duration
- Assignment (=)
- Operators (new, +, -, *, /, %, ==, !=, <,
<=, >, >=, &&, ||, !)
- Conditionals (if, else)
- Loops
(while)
Classes
- Class vs. object
- Object instantiation
(construction)
- Reference variable
type
- Memory diagrams with reference variables and objects
- Objects with
no references, garbage collection
- Methods (how to call them but not how to
define them). You must know how to define main().
Problem Solving
- Break down a problem into a solution
using pseudocode
Exam Rules
a. 50 minutes exam (in discussion not lecture)
b. Closed
book/closed notebooks, no calculators allowed.
c. Please use pencil.
d.
Format:
i. Some short answer conceptual questions.
ii. Code
analysis questions (identify syntax and logical errors, generate code output)
iii.
Write code segments and classes with main() method.