CS111 Test 3 Review

Chapter 6

Methods
  • Defining Methods
  • Calling methods
  • Parameters and arguments
  • Parameters passing by value (copying values)
  • Return values
  • Overloading methods
  • Constants (static final)
  • Declaring and using methods
  • Dividing a program into methods
  • Simulating random events (rolling dice)
  • Scope: local variables, parameters, constants

Chapter 7

Arrays
  • Declaring
  • Initializing
  • Accessing elements
  • Bounds checking
  • Traversing every element
  • Passing arrays as parameters (passing by reference)
  • Return arrays from methods
  • Array algorithms: max, min, find a number, sum, count occurrences
  • Binary search
  • Not covered yet: for each loops, sort, variable length arguments

Clif Presser<cpresser@gettysburg.edu>
Last modified: Mon Nov 7 15:20:05 EST 2016