### Java 2 Interactive Programmer's Workbook

## Source code for Chapter 10

Here is the source code to the exercises and examples for Chapter 10. When possible, we have linked to the corresponding applet as well. You will need to make sure that the Java 2 plug-in is installed on your browser.

Suggestion: Bring up the source code in a separate browser window so you can see the source code and the applet at the same time. To bring up a page in a new window, right-click on the link and select "View link in new window." If you have a three-button mouse, you can middle-click to do the same thing.

#### Baseball/Baseball.java

- Source code for Baseball.java.
- Run the Baseball applet.

#### Baseball/BattingAverage.java

- Source code for BattingAverage.java.
- BattingAverage is not a runnable program with output.

#### Baseball/Name.java

- Source code for Name.java.
- Name is not a runnable program with output.

#### Baseball/TestStats.java

- Source code for TestStats.java.
- TestStats is not a runnable program with output.

#### DogButtonTest/DogButton.java

- Source code for DogButton.java.
- Run the DogButton applet.

#### DogButtonTest/DogButtonTest.java

- Source code for DogButtonTest.java.
- Run the DogButtonTest applet.

#### Exercises/CopyCatButton.java

- Source code for CopyCatButton.java.
- CopyCatButton is not a runnable program with output.

#### Exercises/CopyCatPanel.java

- Source code for CopyCatPanel.java.
- CopyCatPanel is not a runnable program with output.

#### Exercises/Exercises.java

- Source code for Exercises.java.
- Run the Exercises applet.

#### Exercises/FontPanel.java

- Source code for FontPanel.java.
- FontPanel is not a runnable program with output.

#### Exercises/HelveticaButton.java

- Source code for HelveticaButton.java.
- HelveticaButton is not a runnable program with output.

#### ExtensionTest/Ball.java

- Source code for Ball.java.
- Ball is not a runnable program with output.

#### ExtensionTest/ColorBall.java

- Source code for ColorBall.java.
- ColorBall is not a runnable program with output.

#### ExtensionTest/ExtensionTest.java

- Source code for ExtensionTest.java.
- Run the ExtensionTest applet.

#### ExtensionTest/ExtensionTest2.java

- Source code for ExtensionTest2.java.
- Run the ExtensionTest2 applet.

#### ExtensionTest/NewFile2.java

- Source code for NewFile2.java.
- NewFile2 is not a runnable program with output.

#### ExtensionTest/Witness.java

- Source code for Witness.java.
- Witness is not a runnable program with output.

#### ExtensionTest/WitnessProtectionProgram.java

- Source code for WitnessProtectionProgram.java.
- WitnessProtectionProgram is not a runnable program with output.

#### Identify/Identify.java

- Source code for Identify.java.
- Run the Identify applet.

#### Identify/NumberSum.java

- Source code for NumberSum.java.
- NumberSum is not a runnable program with output.

#### Name/Name.java

- Source code for Name.java.
- Name is not a runnable program with output.

#### PrivateTest/House.java

- Source code for House.java.
- House is not a runnable program with output.

#### PrivateTest/PrivateParts.java

- Source code for PrivateParts.java.
- PrivateParts is not a runnable program with output.

#### PrivateTest/PrivateTest.java

- Source code for PrivateTest.java.
- Run the PrivateTest applet.

#### TestName/BattingAverage.java

- Source code for BattingAverage.java.
- BattingAverage is not a runnable program with output.

#### TestName/Counter.java

- Source code for Counter.java.
- Counter is not a runnable program with output.

#### TestName/FullName.java

- Source code for FullName.java.
- FullName is not a runnable program with output.

#### TestName/Inventory.java

- Source code for Inventory.java.
- Inventory is not a runnable program with output.

#### TestName/MinMax.java

- Source code for MinMax.java.
- MinMax is not a runnable program with output.

#### TestName/MyColor.java

- Source code for MyColor.java.
- MyColor is not a runnable program with output.

#### TestName/Name.java

- Source code for Name.java.
- Name is not a runnable program with output.

#### TestName/TestName.java

- Source code for TestName.java.
- Run the TestName applet.

#### TestName/TestName2.java

- Source code for TestName2.java.
- Run the TestName2 applet.

#### TestName/TestName3.java

- Source code for TestName3.java.
- Run the TestName3 applet.

#### TestName/TestName4.java

- Source code for TestName4.java.
- Run the TestName4 applet.

#### TestName/TestName5.java

- Source code for TestName5.java.
- Run the TestName5 applet.

#### TestName/TestName6.java

- Source code for TestName6.java.
- Run the TestName6 applet.

#### TestName/TestName7.java

- Source code for TestName7.java.
- Run the TestName7 applet.

#### TestName/TestName8.java

- Source code for TestName8.java.
- Run the TestName8 applet.

#### TestName/TestName9.java

- Source code for TestName9.java.
- Run the TestName9 applet.

#### TestStack/MyQueue.java

- Source code for MyQueue.java.
- MyQueue is not a runnable program with output.

#### TestStack/MyStack.java

- Source code for MyStack.java.
- MyStack is not a runnable program with output.

#### TestStack/TestStack.java

- Source code for TestStack.java.
- Run the TestStack applet.

Authors: Kevin Chu and Eric Brower
Copyright 2000 Prentice Hall PTR