Book Description

About the Author

Table of Contents

Source Code

Errata

Send Comments

Teaching Materials

Author's Homepage
 

Object-Oriented Software Development Using Java

Xiaoping Jia, Ph.D
Table of Contents
1 Object-Oriented Software Development

   1.1 The Challenges of Software Development
   1.2 An Engineering Perspective
         1.2.1 Software Development Activities
         1.2.2 Software Development Processes
         1.2.3 Desirable Qualities of Software Systems
         1.2.4 Is Software Development an Engineering Process?
   1.3 Object-Orientation
         1.3.1 Modeling the Real-World
         1.3.2 Evolution of Programming Models
         1.3.3 A Brief History
   1.4 Iterative Development Processes
         1.4.1 Object-Oriented Development Activities
         1.4.2 Rational Unified Process (RUP)
         1.4.3 Extreme Programming (XP)

2 Object-Oriented Modeling Using UML
   2.1 Principles and Concepts
         2.1.1 Objects and Classes
         2.1.2 Principles
   2.2 Modeling Relationships and Structures
         2.2.1 Inheritance
         2.2.2 Association
         2.2.3 Aggregation and Composition
         2.2.4 Dependency
   2.3 Modeling Dynamic Behavior
         2.3.1 Sequence Diagram
         2.3.2 State Diagram
   2.4 Modeling Requirements with Use Cases
         2.4.1 Terms and Concepts
         2.4.2 Use Case Diagrams
   2.5 Case Study: An E-Bookstore
         2.5.1 Conceptualization
         2.5.2 Use Cases
         2.5.3 Object Models

3 Introduction to Java
   3.1 An Overview of the Java 2 Platform
   3.2 The Java Run-Time Architecture
         3.2.1 Program Execution Models
         3.2.2 Java Virtual Machine
   3.3 Getting Started with Java
         3.3.1 A Simple Java Application
         3.3.2 A Java Applet

4 Elements of Java
   4.1 Lexical Elements
         4.1.1 Character Set
         4.1.2 Identifiers
         4.1.3 Primitive Types and Literals
         4.1.4 Operators and Expressions
   4.2 Variables and Types
         4.2.1 Variable Declarations
         4.2.2 Type Compatibility and Conversion
         4.2.3 Reference Types
         4.2.4 Arrays
   4.3 Statements
         4.3.1 Expression Statements
         4.3.2 Statement Blocks
         4.3.3 Local Variable Declarations
         4.3.4 The return Statement
         4.3.5 Selection Statements
         4.3.6 Loop Statements
         4.3.7 The break and continue Statements
   4.4 Class Declarations
         4.4.1 Syntax of Class Declarations
         4.4.2 Creating and Initializing Objects
         4.4.3 Accessing Fields and Methods
         4.4.4 Method Invocation and Parameter Passing
         4.4.5 Class (Static) Fields and Methods
         4.4.6 Object Reference this
         4.4.7 Interfaces and Abstract Classes
         4.4.8 Strings
         4.4.9 Wrapper Classes
   4.5 Packages
         4.5.1 Using Packages
         4.5.2 Partitioning the Name Space
         4.5.3 Packages and the Directory Structure
         4.5.4 Organization of the Java Class Library
   4.6 Exceptions
         4.6.1 Sources of Exceptions
         4.6.2 Hierarchy of Exceptions
         4.6.3 Throwing Exceptions
         4.6.4 Catching and Handling Exceptions
   4.7 A Simple Animation Applet

5 Classes and Inheritance
   5.1 Overloading Methods and Constructors
   5.2 Extending Classes
         5.2.1 Constructors of Extended Classes
         5.2.2 Subtypes and Polymorphism
         5.2.3 Overriding Methods
   5.3 Extending and Implementing Interfaces
         5.3.1 Subtypes Revisited
         5.3.2 Single Versus Multiple Inheritance
         5.3.3 Name Collisions among Interfaces
         5.3.4 Marker Interfaces
   5.4 Hiding Fields and Class Methods
   5.5 Applications—Animation Applets
         5.5.1 Parameters of Applets
         5.5.2 An Idiom for Animation Applets
         5.5.3 Double-Buffered Animation
         5.5.4 Reading Files in Applets

6 From Building Blocks to Projects
   6.1 Design and Implementation of Classes
         6.1.1 Public and Helper Classes
         6.1.2 Class Members
         6.1.3 Design Guidelines
         6.1.4 Documenting the Source Code
   6.2 Contracts and Invariants
         6.2.1 Contracts of Methods
         6.2.2 Invaraints of Classes
         6.2.3 Assertions
         6.2.4 Design by Contract
   6.3 The Canonical Form of Classes
         6.3.1 No-Argument Constructor
         6.3.2 Object Equality
         6.3.3 Hash Code of Objects
         6.3.4 Cloning Objects
         6.3.5 String Representation of Objects
         6.3.6 Serialization
   6.4 Unit Testing
         6.4.1 Simple Unit Testing
         6.4.2 JUnit – A Unit Testing Tool
         6.4.3 Testing Coverage Criteria
   6.5 Project Build
         6.5.1 Ant – A Build Tool

7 Design by Abstraction
   7.1 Design Patterns
         7.1.1 Design Pattern: Singleton
   7.2 Designing Generic Components
         7.2.1 Refactoring
         7.2.2 Design Pattern: Template Method
         7.2.3 Generalizing
         7.2.4 Design Pattern: Strategy
   7.3 Abstract Coupling
         7.3.1 Enumerating Elements
         7.3.2 Design Pattern: Iterator
   7.4 Design Case Study—Animation of Sorting Algorithms
         7.4.1 The Initial Implementation
         7.4.2 Separating Algorithms
         7.4.3 Design Pattern: Factory
         7.4.4 Separating Display Strategies

8 Object-Oriented Application Frameworks
   8.1 Application Frameworks
         8.1.1 Characteristics
         8.1.2 Design Requirements
         8.1.3 Specific Frameworks Considered
   8.2 The Collections Framework
         8.2.1 Abstract Collections
         8.2.2 Interfaces of Collections
         8.2.3 Implementations of Collections
         8.2.4 Iterators of Collections
         8.2.5 Ordering and Sorting
   8.3 The Graphical User Interface Framework – AWT and Swing
         8.3.1 The GUI Components
         8.3.2 Design Pattern: Composite
         8.3.3 Layout Managers
         8.3.4 Handling Events
         8.3.5 Frames and Dialogs
   8.4 The Input/Output Framework
         8.4.1 Byte Streams
         8.4.2 Design Pattern: Decorator
         8.4.3 Character Streams
         8.4.4 Random Access Files

9 Design Case Study: A Drawing Pad
   9.1 Planning
   9.2 Iteration 1: A Simple Scribble Pad
         9.2.1 The Scribbling Canvas and Its Listener
         9.2.2 The Application
   9.3 Iteration 2: Menus, Options, and Files
         9.3.1 Strokes
         9.3.2 The Scribble Canvas
         9.3.3 The Canvas Listener
         9.3.4 The Application
         9.3.5 Choosing Colors
   9.4 Iteration 3: Refactoring
         9.4.1 The Shapes
         9.4.2 The Tools
         9.4.3 Extending Components
   9.5 Iteration 4: Adding Shapes and Tools
         9.5.1 The Shapes
         9.5.2 The Toolkit
         9.5.3 Design Pattern: State
         9.5.4 A Concrete Tool – TwoEndsTool
         9.5.5 Extending Components
         9.5.6 Design Pattern: Factory Method
   9.6 Iteration 5: More Drawing Tools
         9.6.1 Filled Shapes
         9.6.2 Drawing Filled Shapes
         9.6.3 The Application
   9.7 Iteration 6: The Text Tool
         9.7.1 The Text Shape
         9.7.2 The Keyboard Input Tool
         9.7.3 The Font Option Menu

10 More Design Patterns
   10.1 Type-Safe Enumeration Type
         10.1.1 A Simple Maze Game
         10.1.2 Enumeration Types
         10.1.3 Unordered Type-Safe Enumeration Idiom
         10.1.4 Ordered Type-Safe Enumeration Idiom
   10.2 Creational Design Patterns
         10.2.1 A Simple Design of the Maze Game
         10.2.2 Design Pattern: Abstract Factory
         10.2.3 Design Pattern: Factory Method
         10.2.4 Design Pattern: Prototype
         10.2.5 Design Pattern: Builder
   10.3 Behavioral Patterns
         10.3.1 Design Pattern: Command
         10.3.2 Supporting Undo
   10.4 Structural Patterns
         10.4.1 Design Pattern: Adapter
         10.4.2 Design Pattern: Composite

11 Concurrent Programming
   11.1 Threads
         11.1.1 Creation of Threads
         11.1.2 Controlling Threads
   11.2 Thread Safety and Liveness
         11.2.1 Synchronization
         11.2.2 Cooperation Among Threads
         11.2.3 Liveness Failures
   11.3 Design Case Study—Tic-Tac-Toe Game
         11.3.1 The Game Board
         11.3.2 The Game
         11.3.3 The Players
         11.3.4 Idiom: Taking Turns

12 Distributed Computing
   12.1 Socket-Based Communication
         12.1.1 Server and Client Sockets
         12.1.2 Servers and Clients Using Sockets
         12.1.3 Design Case Study—Stock Quotes I
   12.2 Remote Method Invocation
         12.2.1 The Architecture
         12.2.2 Using RMI
         12.2.3 Design Case Study—Stock Quotes II
   12.3 Java Database Connectivity
   12.4 Common Object Request Broker Architecture


Book Description - About the Author - Table of Contents
Source Code - Errata - Send Comments
Teaching Materials - Author's Homepage