Next:
1.1 Introduction
Up:
Elements of Object-Oriented Program
Previous:
Elements of Object-Oriented Program
1. From Scheme to Java
Subsections
1.1 Introduction
1.2 What is an Object?
1.3 Java Mechanics
1.3.1 Notation and Syntax
1.3.2 Java Expressions
1.3.3 Precedence of Operations
1.3.4 Java Statements
1.3.5 The Structure of Java Programs
1.3.6 Printing Object Values
1.3.7 Defining Constants
1.3.8 Capitalization and Commenting Conventions
1.4 Java Data Types
1.4.1 Primitive Types
1.4.2 Object Types
1.5 Java Class Definitions
1.5.1 Defining Classes to Represent Compound Data
1.5.2 Constructors
1.5.3 Defining Instance Methods
1.6 The Union and Composite Patterns
1.6.1 Member Hoisting
1.6.2 The Composite Pattern
1.6.3 Defining Instance Methods for a Composite Class
1.6.4 Conditional Statements
1.6.5 Blocks
1.6.6 Singleton Pattern
1.7 Basic Program Design
1.7.1 The Design Recipe
1.7.1.1 Data Analysis and Design
1.7.1.2 Contract and Header
1.7.1.3 Examples
1.7.1.4 Template
1.7.1.5 Body
1.7.1.6 Test
1.7.2 An Extended Example: Lists
1.7.3 Type Predicates and Type Casts in Java
1.7.4 A Sample IntList Program
1.7.5 Inheritance and the Composite Pattern
1.7.6 Overriding
equals
1.7.7 Helper Methods, Packages, and Visibility
1.8 Unit Testing in Java
1.8.1 Tests Should Check Themselves
1.8.2 Tests Should be an Integral Part of the Coding Process
1.8.3 Write The Tests First
1.8.4 Unit Testing and JUnit
1.8.5 Conclusion
1.9 Interfaces
1.9.1 Multiple Inheritance
1.9.2 Implicit Polymorphism
1.9.3 Interface Types
1.10 Using Classes and Interfaces to Enforce Invariants
1.11 The Command Pattern
1.11.1 Static Members of Classes
1.11.2 Complete Java Programs
1.11.2.1 A Complete Java Program
1.12 Loose Ends
1.12.1 Local variables
1.12.2 Casts and Static Type Checking
1.12.3 Exceptions as Errors
1.12.4 Name and Method Overloading
1.13 The Visitor Pattern
1.13.1 Interpreting Arithmetic Expressions
1.13.2 Openness in Data Design
1.13.3 Polymorphic Visitors
1.13.4 Polymorphic Visitors with Arguments
1.14 Unusual Situations versus Runtime Errors
1.14.1 A Motivating Example
1.14.2 Using Java Exceptions
1.14.3 Exception Handling
Corky Cartwright 2002-08-09