Exam 1 Topics
CS141: Introduction to Programming, Fall 2015


General Comments and Recommendations

Chapter 1: Introduction

Vocabulary

syntax
operators
punctuation
key words
programmer defined names
variables
statement

expression
Java compiler
byte code
source file
Java Virtual Machine
IDE - Integrated Development Enviroment (e.g Netbeans)

Topics

Chapter 2: Fundamental Data Types

Vocabulary

Class and Method Syntax:
  ... class, object, method
  ... class header and body
  ... class name = file name
  ... access specifier
  ... method header and body
  ... parameter & argument
  ... brackets - code blocks
  ... statement vs expression
  ... semicolons and other punctuation {},(),//,;,"",''
  ... programming style, indentation, Netbeans formatting tool
  ... comments, single line, multi-line, Javadoc
  ... API Application Programmer Interface
  ... packages and the import statement
  ... dot notation

Variables:
  ... type: primitive vs Class
  ... primitive data types (int, float, double, boolean, char)
  ... Class types (String)
  ... variable declaration
  ... identifier
  ... variable initialization
  ... case sensitive
  ... literal, String literal
  ... constant (final)
  ... scope

String Variables and Operations:
  ... String Class
  ... String operations
  ... escape sequence and control characters See Table 2-2, p. 42
  ... String concatenation and the + operator

Variable Operations:
  ... assignment operator, assignment statement
  ... operator
  ... binary arithmetic operators: +, -, *, /, %
  ... unary arithmetic operators: -, ++, --
  ... Mod function (%)
  ... integer division
  ... Math class, Math.PI, Math.random()
  ... operator precedence
  ... type conversion, cast operator

Keyboard I/O, input/output:
  ... Scanner class
  ... Dialog Boxes
  ... System.out.print, System.out.println
  ... System.out.printf, format specifier
  ... console
  ... standard output/input

Topics

Chapter 3: Classes and Objects

Vocabulary

Object-oriented programming & Class Structure
  ... Class (user defined type)
  ... Object (instance of class)
  ... primitive type vs class type
  ... Attributes, Fields, or Member variables (data)
  ... Methods (actions)

Method Structure:
  ... access specifier or modifier (e.g. public, private)
  ... method name
  ... method parameters
  ... return type, return value
  ... variable scope: local vs global, shadowing

Class Structure (more detail):
  ... Constructors, default constructor
  ... Public interface
  ... Private implementation, data hiding
  ... Mutator methods (setter)
  ... Accessor methods (getter)
  ... toString method

Object Creation and Use
  ... The keyword: new
  ... Sending a message, calling a method
  ... dot notation
  ... (formal) parameter vs argument (actual parameter)
  ... parameter passing
  ... Null pointer and the Null Pointer Exceptions

Code Design and Development
  ... UML Diagram
  ... API (Application Programmer Interface)
  ... Encapsulation, modularization
  ... stepwise refinement
  ... reusability

Testing and Debugging
  ... debugging & testing
  ... tracing code

Topics

Chapter 4: Decision Structures

Vocabulary

Types of Decision Structures:
  ... if statement
  ... if-else statement
  ... multi-way if-else
  ... nested if-else
  ... switch statements
  ... indentation conventions
Code blocks & variable scope


Decision Structure Syntax:
  ... decision logic and flow charts
  ... condition and body
  ... boolean value, expression

Random numbers


Building Boolean Expressions:
  ... relational operator (<, >, <=, >=, ==, !=)
  ... boolean (logical) operators (!, &&, ||)
  ... boolean operators precedence (See table)
  ... truth tables (e.g. Tables 4-6,4-7,4-8)
  ... De Morgan's Laws

String Comparison
  ... Lexicographic ordering (of Strings)
  ... compareTo() and .equals operators

Other (optional)
  ... The Conditional Operator bool ? val1 : val2
  ... Switch statement (p. 238)
  ... DecimalFormat (p. 248)

Topics

Chapter 5: Loops

Vocabulary

increment/decrement operators
while-loop (a pretest loop)
for-loop (a pretest loop)
unwinding and hand tracing
do-while-loop (a posttest loop)
nested loop
Control variable, initialization, condition, update; loop body
sentinel value
counter, running total
running totals, accumulator
infinite loop

Topics