Exam 2 Topics
CS141: Introduction to Programming, Spring 2018


Exam 2 will take place on Friday, April 11, 2018.

General Comments and Recommendations

Chapter 6 Looping

Vocabulary

increment/decrement operators
postfix/prefix modes
flow charts
while-loop (a pretest loop)
for-loop (a pretest loop)
unwinding and hand tracing
do-while-loop (a posttest loop)
nested loop
break and continue statement
Control variable, initialization, condition, update; loop body
sentinel value
counter, running total
sum & average: running totals, accumulator
searching for matches
infinite loop
random numbers

Misc Topics

Chapter 7 Arrays and ArrayLists

Vocabulary

array (1D, 2D, multi-dimensional)
Declaring an array
Accessing array elements
Initializing an array
Enhanced for-loop
Out of bounds problems
Calculating with arrays:
  ... comparing, summing, min/max, averages, swap elements
  ... sequential search, sorting
Arrays class
Arrays as arguments & parameters
Arrays of objects
Selection sort
Binary search
2D Arrays
  ... declaring
  ... obtaining number of rows/columns
  ... accessing elements
  ... as arguments & parameters
ArrayList class
  ... Creating and declaring an ArrayList
  ... Diamond syntax <>
  ... Auto-boxing/wrapping

Misc Topics

Chp 11: Input/Output and Exception Handling

Vocabulary

File
Ascii (text) file vs binary file
Opening a file
Closing a file
White space

Exception
Throwing an Exception
Catching an Exception
try-catch
Delimiter

Topics

Chp 8: Designing Classes

Vocabulary

Static (or class) member variables (fields)
Static (or class) methods
Method signature (name + parameter types)
Comparing objects (.equals)
Copy constructor
Deep vs shallow copying

Topics

Chapter 9 Inheritance and Chp 10: Interfaces

Vocabulary

Inheritance, "Is a" relationship (extends keyword)
superclass (or base or parent class)
subclass (or derived or child class)
super()
Object class
Polymorphism
dynamic binding (dynamic method look-up)

Abstract (vs concrete) class
Interfaces (implements keyword)
protected access / package access
inheritance hierarchy
overriding methods (e.g. equals) (not to be confused with overloading)
instanceof operator
comparable interface

Topics