Next:
1.1 Introduction
Up:
Notes on Object-Oriented Program
Previous:
Notes on Object-Oriented Program
1. From Scheme to Java
1.1 Introduction
1.1.1 What is an Object?
1.2 Java Mechanics
1.2.1 Notation and Syntax
1.2.2 Java Expressions
1.2.3 Precedence of Operations
1.2.4 Java Statements
1.2.5 The Structure of Java Programs
1.2.6 Static Members
1.2.7 Java Programs
1.2.7.1 A Sample Java Program
1.2.7.2 Variations on the Sample Program
1.2.8 Defining Static Methods
1.2.9 Capitalization and Commenting Conventions
1.3 Java Data Types
1.3.1 Primitive Types
1.3.1.0.1 Numeric Constants
1.3.1.0.2 Conversions Between Types
1.3.2 Object Types
1.4 Java Class Definitions
1.4.1 Defining Classes to Represent Compound Data
1.4.2 Constructors
1.4.3 Defining Instance Methods
1.4.4 Printing Objects
1.5 The Union and Composite Patterns
1.5.1 Member Hoisting
1.5.2 The Composite Pattern
1.5.2.0.1 When Unions are Composite
1.5.3 Defining Instance Methods for a Composite Class
1.5.4 Conditional Statements
1.6 Basic Program Design
1.6.1 The Design Recipe
1.6.1.1 Data Analysis and Design
1.6.1.2 Contract and Header
1.6.1.3 Examples
1.6.1.4 Template
1.6.1.5 Body
1.6.1.6 Test
1.6.2 An Extended Example: Lists
1.6.2.1 Type Predicates and Type Casts in Java
1.6.2.2 Avoiding the Use of the
instanceof
test
1.6.2.3 Maintaining Sample Test Data
1.6.2.4 A Sample Program
1.6.3 Inheritance and the Composite Pattern
1.6.3.1 Overriding
equals
1.6.4 Help Methods, Packages, and Visibility
1.7 Using Classes to Enforce Invariants
1.8 Interfaces
1.8.1 Multiple Inheritance
1.8.2 Implicit Polymorphism
1.8.3 Interface Types
1.9 The Command Pattern
1.10 Static Members of Classes
1.10.1 Singleton Pattern
1.10.2 Other Uses of Static Members
1.11 Loose Ends
1.11.1 Local variables
1.11.2 Casts and Static Type Checking
1.11.3 Exceptions as Errors
1.11.4 Name and Method Overloading
1.12 The Visitor Pattern
1.12.1 Interpreting Arithmetic Expressions
1.12.2 Openness in Data Design
1.12.3 Polymorphic Visitors
1.12.4 Polymorphic Visitors with Arguments
1.13 Unusual Situations versus Runtime Errors
1.13.1 A Motivating Example
1.13.2 Using Java Exceptions
1.13.3 Exception Handling
Corky Cartwright
2000-01-07