Midterm Review
What Kinds of Questions Are on the Exam?
  - Matching – match terms with definitions.
- True/False
- Multiple choice
- Reading Expressions – given an expression, what does it evaluate to?
- Writing Expressions – given a description, write the expression.
- Reading Code – given a fragment of code, what does it output?
- Writing Code – given a specification, write a program or a part of a program that implements it.
What Does the Test Cover?
  - Chapter 1 – Introduction to Computers and Java
    
  
- Chapter 2 – Basic Computation
    
      - 2.1 – Variables and Expressions
- 2.2 – The Class String
- 2.3 – Keyboard and Screen I/O
- 2.4 – Documentation and Style
 
- Chapter 3 – Flow of Control: Branching
    
      - 3.1 – The if-elseStatement
- 3.2 – The Type boolean
- 3.3 – The switchStatement
 
- Chapter 4 – Flow of Control: Loops
    
      - 4.1 – Java Loop Statements
- 4.2 – Programming with Loops
 
What Should I Study?
  - Textbook chapter summaries
- PowerPoint slides
- Quizzes
- Assignments
- Notes you have taken for the course
Terms – Chapter 1 – Hardware and OS
  - CPU – central processing unit
- Memory
- RAM – random access memory
- Address
- Bit
- Byte
- File
- OS – operating system
Terms – Chapter 1 – Programming Languages
  - Compiler
- Interpreter
- Source Code
- Bytecode
- Statement
- Variable
- Expression
- Syntax
Terms – Chapter 1 – Programming Basics
  - OOP – object-oriented programming
- Class
- Method
- Encapsulation
- Information Hiding
- Polymorphism
- Inheritance
- Algorithm
Terms – Chapter 2
  - Declaration
- Integer
- Floating-point number
- Character
- Identifier
- Keyword
- Assignment Statement
- Constant
- String
Terms – Chapters 3
  - Control structure
- Branching statement
- Boolean expression
- Comparison operator
- Logical operator
- Nesting
- Short-circuit evaluation
- Enumeration
Terms – Chapter 4
  - Loop statement
- Body
- Iteration
- Count-controlled loop
- Sentinel value
- Infinite loop
- Off-by-one error