The Object of Java
The Revolution
Objects Centric Approach
Software Engineering Principles
Enhanced BlueJ Version
Table of Contents
Preface
Ordering Info
Sample Chapters
Exam Copy
About the Author
Teaching Resources
aw.com
Black Box?
Table of Contents
Objects and Classes
  • Objects Everywhere
  • Objects in Software
  • Anatomy of a Software Class
  • The Difference Between Objects and Classes
  • Edit, Compile and Run
  • Introduction to Software Engineering
  • A Sample of Object-Oriented Software Development
Introduction to Java Objects
  • Syntax Diagrams
  • The Method Call
  • Instruction Sequences
  • Constructing and Assigning Objects
  • Swapping
  • Putting it Together in a Java Class
  • Programming by Contract
  • Comments
Introduction to Design and Implementation
  • Top-Down Design - Refining Algorithms
  • Selecting Identifiers
  • A Second Design Example
  • A GUI Software Library
  • Calling Methods with Parameters
  • Import Declarations
  • Prototyping
  • Debugging - System.Out.Println
  • Summary
Methods
  • The Need for a Subprogram
  • Private Parameterless Methods
  • Using Parameters
  • Local Variables
  • Nonvoid Methods
  • This
  • Introduction to Event Handling
  • Postcondition Notation
  • A Design Example Using AView
Numeric Processing
  • Primitive Types
  • Primitive Integer Data Types
  • Differences between Primitives and References
  • Real Numbers (Float and Double Types)
  • System.Out.Println Revisited
  • Mixed-Type Numeric Expressions
  • Primitive Methods (including Math)
  • Constants (Final)
  • Numeric Expression Patterns
  • Design Example - Dynamic Histogram
Supplier Classes
  • Clients and Suppliers in Software
  • Another Client
  • Suppliers
  • Scope and Lifetime
  • Class Interface Design Principles
  • Separating Read and Write Access
  • Method Overloading
  • Char Data Type
  • Strings
  • ALabel (optional)
Logic and Selection
  • The if Instruction
  • Relational Expressions
  • Boolean Expressions
  • Conditional Evaluation
  • Predicates
  • Nesting if Instructions
  • Multi-way Selection
  • The Switch Instruction
  • Software Testing
  • Logic and Programming (Optional)
  • Assertions Revisited (Optional)
Inheritance
  • Extends
  • Class Relations: contains_a and is_a
  • Specialization and Extension
  • Protected Scope
  • Inheriting for Event Handling
  • Animating by Inheriting EventTimer (Optional)
  • Design Example with Scrollbars and Text Fields (Optional)
  • Recap
Inheritance Hierarchies and Polymorphism
  • Inheritance Hierarchies
  • Type Conformance
  • Subtype Polymorphism
  • Abstract Classes
  • The Object Class
  • Equality by Content and by Identity
Repetition
  • The while Loop
  • Counting Loops
  • Sentinel Loops
  • Loop Design Cautions
  • Nested Loops
  • The do loop
  • Loop Invariants
  • Looping and Event Handling
  • Testing and Loops
Containers
  • Containers of Objects
  • Generic Containers
  • Type Safety, Casting, and instanceof
  • Wrapper Classes
  • Lists
  • List Traversal
  • Linear Searching
  • Sorting by Insertion
Introduction to Arrays
  • One-dimensional Arrays
  • Keeping Indices in Bounds
  • Sequential Processing with for Loops
  • Treating Arrays in Aggregate
  • Tables
  • Arrays of Objects
  • Arrays and Objects
  • Sorting - The Selection Sort
  • Two-Dimensional Arrays
File Input and Output
  • Files
  • The Java File Class
  • I/O Exceptions
  • Input and Output
  • DataInputStream and DataOutputStream
  • Text Files
  • Terminal-style I/O (Optional)
  • Persistent Objects (Optional)
  • JFileChooser (Optional)
Recursion
  • Recursive Definition
  • From Recursive Definition to Method
  • Recursive Methods
  • Recursive Execution
  • Recursion and Repetition
  • More Complicated Forms of Recursion
Library Issues: Packages, Statics, Applets and Delegation
  • Creating Packages
  • Using Packages
  • Static Methods
  • Static Variables
  • Applications and Applets
  • Event Delegation (Optional)
APPENDIXES

A: Intro to Computing Systems
  • What Is a Computer?
  • Analog or Digital?
  • How is Data Stored?
  • What are Binary Numbers?
  • How Do Computers Communicate?
  • Why are Computers Called "Systems"?
B: Java Syntax Diagrams

C: Precedence of Java Operations

D: Swing, awt and aLibrary

E: UML Notations




© Copyright 2002 Addison-Wesley, a division of Pearson Education, a Pearson plc company. All rights reserved. Legal disclaimer. E-mail webmaster@awl.com