CS111 Test 2 Review

Suggestions for Studying

Test style

The test will be 50 minutes long, and will be taken on paper.

Topics

Chapter 5: loops Chapter 6: methods
  • while loop
  • do..while loop
  • for loop
  • counting loops
  • sentinel loops
  • ifs within loops
  • find the maximum.minimum example
  • nested loops
  • break and continue
  • 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

Clif Presser<cpresser@gettysburg.edu>
Last modified: Fri Oct 7 09:18:30 EDT 2016