List of Exhibits

 < Day Day Up > 

 



Chapter 1: Introduction to Concurrent Programming and Components

Exhibit 1: Program1.1: A Program To Calculate Fibonacci Numbers
Exhibit 2: Synchronous Activity to Make a Pie
Exhibit 3: One Possible Example of Asynchronous Activities in Making a Pie
Exhibit 4: Competitive and Cooperative Synchronization

Chapter 2: Threads and Program Contexts

Exhibit 1: Program2.1: Procedural Program
Exhibit 2: Program2.2: Concurrent Program Created Using the Runnable Interface
Exhibit 3: Program2.3: Concurrent Program Created by Extending the Thread Class
Exhibit 4: Program2.4: Procedural Program with Two Method Calls
Exhibit 5: Output from Exhibit 4 (Program2.4)
Exhibit 6: Program2.5: Concurrent Program with Two Threads and a Main Thread
Exhibit 7: Two Possible Outputs from Exhibit 6 (Program2.5)
Exhibit 8: Graphic Representation of Two Processes in the SVM
Exhibit 9: Procedural Program for Exhibit 10
Exhibit 10: Steps in Executing a Procedural Program
Exhibit 11: SVM Thread States
Exhibit 12: Relationship between Ready and Running States in SVM
Exhibit 13: Concurrent Program for Exhibit 14
Exhibit 14: Steps in Executing a Concurrent Program
Exhibit 15: State Model with Sleep and Blocked States
Exhibit 16: SVM with Sleep and Blocked Queues
Exhibit 17: Program2.6: Program with a Race Condition
Exhibit 18: Possible Output from Program2.6 (Exhibit 17)
Exhibit 19: Program2.7a: Binary Semaphore
Exhibit 20: Program2.7b: Program that Safely Swaps Values
Exhibit 21: Program2.8: Safe Swap Program Using the Synchronized Modifier
Exhibit 22: SVM with Wait Queue on an Object
Exhibit 23: Program2.9: Two Cooperating Threads Not Taking Turns
Exhibit 24: Program2.10: Two Cooperating Threads Taking Turns but Resulting in Deadlock
Exhibit 25: Program2.11: Incorrect Usage of a Component to Compensate for an Error in Implementing the TurnPrinter Component
Exhibit 26: Program2.12: Correct TurnPrinter Component
Exhibit 27: Program2.13: Circular Deadlock Example
Exhibit 28: SolveRaceConditon_2.java
Exhibit 29: Problem2_31
Exhibit 30: Problem2_32

Chapter 3: Designing and Implementing Concurrent Programs with State Diagrams

Exhibit 1: Program3.1a: Producer Class
Exhibit 2: Program3.1b: Consumer Class
Exhibit 3: State Diagram for Producer/Consumer Problem
Exhibit 4: Program3.1c: Implementation of the BoundedBuffer Object
Exhibit 5: Program3.1d: Implementation of the Producer Consumer Control Object
Exhibit 6: State Diagram for Gas Pump Problem
Exhibit 7: Program3.2a: Car Class
Exhibit 8: Program3.2b: Pump Class
Exhibit 9: Program3.2c: Gas Station Class
Exhibit 10: Pseudo-Code for the Elevator and the Passenger
Exhibit 11: Problem 6: State Diagram for the Floor Object
Exhibit 12: Problem 7: State Diagram for the Floor Object
Exhibit 13: New Pseudo-Code for the Elevator and the Passenger
Exhibit 14: Problem 8: State Diagram for the Floor Object
Exhibit 15: Problem 9: State Diagram for the Floor Object
Exhibit 16: Problem 19: Santa Claus at the North Pole

Chapter 4: Identifiers, Variables, Objects, and Collection Classes

Exhibit 1: Program4.1: Simple C Program That Treats a Variable and Identifier Data Types As If They Are the Same
Exhibit 2: Program4.2: Operation on an Incorrect Data Type in C
Exhibit 3: Program4.3: Compiler Error in Referencing an Object of Data Type Object with a Variable Data Type of Person
Exhibit 4: Program4.4: Runtime Error Casting a Variable to a Non-Matching Data Type
Exhibit 5: Program4.5: Catching a ClassCastException
Exhibit 6: Program4.6: Using the Instanceof Operator to Check the Runtime Data Type before Casting
Exhibit 7: Program4.7: Implicit and Explicit Casting in Java
Exhibit 8: Program4.8: Casting Error Example
Exhibit 9: Memory Leak with a Linked List
Exhibit 10: Dangling Reference with a Linked List
Exhibit 11: Proper Memory Collection with a Doubly Linked List
Exhibit 12: Vector Object for Exhibit 13 (Program4.9) as Stored in Memory
Exhibit 13: Program4.9: Program to Create a Vector Object
Exhibit 14: Program4.10: Program to Write XML Definition of Exhibit 15
Exhibit 15: XML Output for Vector in Exhibit 13 (Program4.9)
Exhibit 16: Program4.11: Allocating an Array of Primitives
Exhibit 17: Program4.12: Allocating an array of objects
Exhibit 18: Program4.13: Array of Objects
Exhibit 19: Program4.14: Example of Using a Vector Class
Exhibit 20: Four Swap Methods
Exhibit 21: Program with Numbered Lines
Exhibit 22: Garbage Collection Program
Exhibit 23: Equals Method in Class Person
Exhibit 24: Program for Problem 26
Exhibit 25: Program with Numbered Lines

Chapter 5: Programming to an Interface

Exhibit 1: Program5.1a: Class Template for Generic Stack
Exhibit 2: Program5.1b: Main Program Creating Two Stack Template Classes
Exhibit 3: Program5.2: PersonTable Object That Stores Only Person Records
Exhibit 4: Program5.3a: Printable Interface
Exhibit 5: Program5.3b: PrintTable Class
Exhibit 6: Program5.3c: Table That Stores Person Objects
Exhibit 7: Program5.3d: Table That Stores Car Objects
Exhibit 8: Program5.3e: Implementing a PrintTable that Stores Both Person and Car Objects
Exhibit 9: Program5.4a: PrintableSortable Definition
Exhibit 10: Program5.4b: The PrintTable Class
Exhibit 11: Program5.4c: Program to Store Person Objects
Exhibit 12: Tree Map #1
Exhibit 13: Tree Map #2
Exhibit 14: Program5.5: Expression Tree
Exhibit 15: Interface Example
Exhibit 16: Implementing a Bubble Sort for an Integer Array

Chapter 6: Exceptions in Java

Exhibit 1: Program6.1: Modification to the Person Class to Handle ClassCastException
Exhibit 2: Program6.2: Modification of SortedPrintTable to Stop Invalid Person Objects from Being Stored in a Person Table
Exhibit 3: Program6.3: An Example of Error Handling in a Simple C Program
Exhibit 4: Program6.4a: Try-Catch Block with No Exception Thrown
Exhibit 5: Program6.4b: Catch Block Handling the ArithmeticException
Exhibit 6: Program6.4c: Unhandled ArithmeticException
Exhibit 7: Program6.4d: Multiple Catch Statements
Exhibit 8: Program6.4e: Actions That Can Be Taken on Exceptions
Exhibit 9: Program6.5: Exception Propagation
Exhibit 10: Program6.6: Finally Block
Exhibit 11: Program6.7: Java Program Equivalent to C Exhibit 3 (Program6.3)
Exhibit 12: Java Exception Hierarchy
Exhibit 13: Program6.8: Catching a Checked Exception
Exhibit 14: Program6.9: Throwing a Checked Exception
Exhibit 15: Program6.10: Explicit ArithmeticException That Does Not Have to Be Handled
Exhibit 16: Program6.11a: Creating a User-Defined Exception
Exhibit 17: Program6.11b: Using the NumberOutOfBoundsException
Exhibit 18: Program to Problem 6.9

Chapter 7: Implementing an Animator Component Using the Java Event Model

Exhibit 1: Program7.1a: Path Class
Exhibit 2: Program7.1b: Straight Line Path Class
Exhibit 3: Program7.1c: Simple Animator and Ball Classes
Exhibit 4: Program7.2: Simple Animator with a Speed Control
Exhibit 5: Program7.4: Generic Animator with Control Panel
Exhibit 6: Program7.3a: The Drawable Interface
Exhibit 7: Program7.3b: The Generic Animator
Exhibit 8: Deadlock in an Animator
Exhibit 9: Program7.3c: Program That Uses the Generic Animator
Exhibit 10: Design of the Generic Animator
Exhibit 11: Java Event Model
Exhibit 12: Program7.5a: DrawListener Class
Exhibit 13: Program7.5b: DrawEvent Class
Exhibit 14: Program7.5c: Animator Class
Exhibit 15: Program7.5d: MoveObjects Program with the Corrected Animator Component
Exhibit 16: Program7.6a: DrawEventMulticaster
Exhibit 17: Program7.6b: Animator Using the DrawEventMulticaster
Exhibit 18: Program for Problem 20

Chapter 8: Cooperative Synchronization

Exhibit 1: Program8.1: Thread Animation with No Coordination
Exhibit 2: Program8.2: Thread Animation with the Run Method Synchronized
Exhibit 3: Program8.3: Breaking Synchronization with a Call to Wait(waitTime)
Exhibit 4: Program8.4: Concurrent Animation with a Race Condition
Exhibit 5: Program8.5: Correct Concurrent Animation
Exhibit 6: Program8.6: Implementation of the Notification Object
Exhibit 7: Program8.7a: Pump Class
Exhibit 8: Program8.7b: Car Class
Exhibit 9: Program8.7c: Gas Station Class

Chapter 9: Combining Concurrent Techniques

Exhibit 1: Binary Semaphore State Diagram
Exhibit 2: Program9.1: FIFOBS implementation
Exhibit 3: Program9.2: Alternative FIFOBS Implementation with Preand Post-Conditions
Exhibit 4: Readers/Writers State Diagram
Exhibit 5: Program9.3a: Readers/Writers Buffer Implementation
Exhibit 6: Program9.3b: Using the Readers/Writers Buffer
Exhibit 7: Pump Notifies Pump Manager It Is Free
Exhibit 8: Pump Manager Gives Pump to a Waiting Car
Exhibit 9: Car Uses Pump and Pump Notifies the Pump Manager When It Is Free Again
Exhibit 10: Program9.4a: PumpListener Class
Exhibit 11: Program9.4b: PumpEvent Class
Exhibit 12: Program9.4c: Pump Class
Exhibit 13: Program9.4d: Car Class
Exhibit 14: Program9.4e: PumpManager Class
Exhibit 15: Program9.4f: GasStation Class
Exhibit 16: Program9.5a: DrawListener Interface
Exhibit 17: Program9.5b: DrawEvent Class
Exhibit 18: Program9.5c: ControllerAlreadyStartedException
Exhibit 19: Program9.5d: Controller Interface
Exhibit 20: Program9.5e: ControllerImp Class
Exhibit 21: Program9.5f: ControlPanel Class
Exhibit 22: Program9.5g: Animator Class
Exhibit 23: Program9.5h: Concurrent Ball Program To Run the New Animator
Exhibit 24: Psuedo-Code Design of the Three Active Objects
Exhibit 25: ControllerImpl Stat Diagram

Chapter 10: Organizing the Problem for Reuse: Reuse of Utility Classes

Exhibit 1: Program10.1: Reuse by Copy
Exhibit 2: Program10.2: Method Reuse
Exhibit 3: Program10.3: Ball and Square Classes, Each Implementing Its Own Move Method
Exhibit 4: Program10.4a: MoveController Utility Object Showing Reuse by Classification
Exhibit 5: Program10.4b: Program That Uses a MoveController Object
Exhibit 6: Program10.5a: MoveController Utility Object Showing Reuse by Composition
Exhibit 7: Program10.5b: Program That Uses a MoveController Object
Exhibit 8: Program10.6a: New Classification Implementation Using Encapsulation
Exhibit 9: Program10.6b: Concurrent Ball Program Using MoveController from Problem10.5a
Exhibit 10: Program10.7: Improper Use of Stack Object

Chapter 11: Object-Oriented Design

Exhibit 1: Program11.1a: Composition Example for a Car Class
Exhibit 2: Program11.1b: Classification Example for a Car Class
Exhibit 3: Program11.2: Employee Class
Exhibit 4: Program11.3: Club
Exhibit 5: Program11.4: Club
Exhibit 6: Program11.5: Composition Solution to Modeling Employees
Exhibit 7: Program11.6: Amphibious Vehicle Designed Using Multiple Inheritance
Exhibit 8: Program11.7: Amphibious Vehicle Designed Using Composition and Explicit State
Exhibit 9: Program11.8: Operator
Exhibit 10: Program11.9: Add and Subtract Operator Classes Using Composition
Exhibit 11: Program11.10a: Add and Subtract Operator Classes Using Classification
Exhibit 12: Program11.10b: Implementing an Operator Node Using Classification
Exhibit 13: Problem 5a: Java
Exhibit 14: Problem5b: Java

Chapter 12: Program Management in Java

Exhibit 1: Standards
Exhibit 2: Naming Identifiers
Exhibit 3: Program12.1
Exhibit 4: Program12.2
Exhibit 5: useAnimator.bat

Chapter 13: Distributed Programming using RMI

Exhibit 1: Components That Make Up RMI
Exhibit 2: Registering the Server Object
Exhibit 3: Retrieving the Handle for the Server Object
Exhibit 4: Client and Server Communicating
Exhibit 5: Program13.1a: HelloWorld Interface
Exhibit 6: Program13.1b: HelloWorld Server Class
Exhibit 7: Program13.1c: HelloWorld Client Class
Exhibit 8: Program13.2a: Server Interface
Exhibit 9: Program13.2b: ServerImp Class
Exhibit 10: Program13.2c: Client Class
Exhibit 11: Program13.2d: PrintMessage Interface
Exhibit 12: Program13.2e: PrintMessageImp Class
Exhibit 13: Program13.3a: PrintMessage Interface for Migrating Object
Exhibit 14: Program13.3b: PrintMessageImp Class for Non-Migrating Object
Exhibit 15: Program13.4a: The ChatListener
Exhibit 16: Program13.4b: The ChatServer Interface
Exhibit 17: Program13.4c: The ChatEvent
Exhibit 18: Program13.4d: The ChatServer
Exhibit 19: Program13.4e: The ChatClient Program



 < Day Day Up > 

 



Creating Components. Object Oriented, Concurrent, and Distributed Computing in Java
The .NET Developers Guide to Directory Services Programming
ISBN: 849314992
EAN: 2147483647
Year: 2003
Pages: 162

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net