CS 102 Exam 2 Review Topics
Chapter 5 - Java Language Basics
- Introduction & Objectives - READ THEM
- Primitive Types
- Eight Java primitive types (names and sizes)
- Legal constant values of each primitive types
- Identifiers, Keywords, and Variables
- Syntax of legal identifiers
- Java keywords (don't memorize all of them - know those you use)
- Difference between instance and local variables
- The idea of scope of an identifier
- The rules for resolving scope
- The concepts of static and final variables
- The concept of packages (see also use in ATM lablet of chapter 7)
- The four access modifiers (see table at bottom of page 177)
- Operators and Expressions
- The concepts of precedence and associativity
- The concept of type promotion (see page 180)
- The concept of type casts
- The Math class and its common methods and constants
- Bitwise operators only as apply to key masks
- Comparison operators
- Logical operators (especially the non-bitwise ones)
- Lightly over complicated boolean expressions
- Distributive and DeMorgan's laws only for extra
- Assignments and Statements
- Assignment operators
- Difference between class and primitive variables (especially understand class variables)
- Know assignment and equality differences between class and primitive variables
- Instanceof operator (conditional operator extra)
- Types of Java statements
- See operator precedence table on page 211 (don't memorize it)
- Hands On - Sodapop.java - LOOK IT OVER
- Summary - READ IT
- Class References - SCAN AT MOST - you should have already read them
- Lab Exercises & Postlab Exercise - SCAN THEM - you should have already done them
Chapter 6 - Events and Actions
- Introduction & Objectives - READ THEM
- More Java Programming
- The if decision statement (all forms)
- The switch decision statement (see restrictions on expression on page 231)
- Use of the break statement
- Concept of an abstract class
- Concept of an interface
- Event-Driven Programming
- Concept of the delegation model
- Features of the delegation model (see page 238)
- Basics of event handling (see page 241)
- This section is very important!!!
- The AWEEvent Hierarchy
- Know event hierarchy (see page 242)
- Understand action, adjustment, input, item, key, mouse, and text events
- Listeners
- Understand the concept of a listener interface
- Know the eleven listener interfaces
- Understand the concept of an adapter class
- Know the seven adapter classes
- Know methods of listener interfaces that we have used
- Hands On - GalaEvents.java - LOOK IT OVER
- Hands On - SketchPad.java - LOOK IT OVER
- Summary - READ IT
- Class References - SCAN AT MOST - you should have already read them
- Lab Exercises & Postlab Exercise - SCAN THEM - you should have already done them
Chapter 7 - Methodical Programming
- Introduction & Objectives - READ THEM
- Method Recap
- Concept of method signatures
- How methods can be called
- Difference between actual and formal arguments
- Correspondence between actual and formal arguments
- Initialization of formal from actual arguments
- Difference between value and reference arguments
- Step 1: Specification
- The importance of the specification
- Suggestion of what to design first, what to do next
- Step 2: Determine the Classes
- Suggestion of what should suggest classes
- Suggestion of how to do GUI design
- Suggestion about length of designing and coding
- Suggestion about size of methods
- Concept of stubs
- Use of stubs
- Step 3: Determine the Methods
- Concept of top-level decomposition
- Use of stubs
- Suggestion on how to build and test a program
- Suggestion on self-documenting code
- Step 3, Continued
- Concept of an addXXXListener to panel class
- When a new class is appropriate
- Suggestion about generality
- Benefits of using documentation
- Suggestion on how to determine the variables
- Suggestion about duplication
- Concept of cleanup and rewriting
- The ATM Applet
- Understand the ATM applet
- The Keypad class
- The NumField class
- The actionPerformed method organization
- Hands On - Calculator.java - LOOK IT OVER
- Summary - READ IT
- Class References - SCAN AT MOST - you should have already read them
- Lab Exercises & Postlab Exercise - SCAN THEM - you should have already done them
Date page last modified and links checked: March 26, 2000
Contact for information or technical questions:
isaacson@fisher.unco.edu