Java Outside In
Ethan Bolker and Bill Campbell
Updated Source Code

This page is the entry point to an updated version of the information on the CD that accompanied Ethan D. Bolker and Bill Campbell's Java Outside In, published by Cambridge University Press. You should consider using this version in place of the original CD; you will find a zip file for the updated CD image at JOICD.zip.

Refer to the Errata Page for errors that we or our readers have found and that are fixed here.

This CD contains

FOR MAC USERS

If you have a Macintosh computer with a pre-OSX operating system, many of the links from this file will not work in your browser because your Mac truncates filenames to an 8.3 format. But you should be able to open all the files with the "Open File" feature.

You may also have trouble with line breaks when reading or compiling the source files, since Mac conventions for line break characters differ from those of other systems.

An alternative is to use your browser's "Open File" to open the zipped image of this CD at JOICD.zip. Most modern Mac browsers will invoke StuffIt Expander™ to unpack the files in a manner compatible with your Mac. If you don't already have this tool, StuffIt Expander is downloadable for free from Aladdin Systems.

As always, you can get anything on the CD directly from the internet at the Java Outside In web site.

COPYRIGHT

This software is in copyright. Individuals are permitted to copy the software for their personal use and for educational and research purposes only. All other use, and in particular any commercial use, requires the permission of the author.

Library purchasers may make one copy of the CD-ROM for archive purposes only. The library purchaser may make the CD-ROM available through a secure server for single-user access only, but the CD-ROM may not otherwise be networked within the library or the library's institution without the prior permission of the author.

DISCLAIMER

This software is provided 'as is'. No warranty, express or implied, is given as to the software's freedom from error, merchantability, or fitness for any particular purpose. The author and the publisher disclaim any and all liability to the extent permitted by applicable law for direct, incidental, or consequential damages resulting from the use of the software. Users are specifically advised that the software should not be used in any application that could result in injury to a person and/or in damage to or loss of property.

Browsing

The code is presented in browseable HTML format. The HTML was produced using Java2HTML, a lovely program written by Jason Shattu and available at http://www.java2html.com/. Thanks to Jason for allowing us to use Java2HTML for preparing this CD.

The code is organized by chapter and application. To browse the code for an application, simply click on its link below.

Chapter 1

The Bank application (version1)
The TrafficLight application (Version 1)
The EStore application (version 1)

Chapter 2

The Change application (version 2)
The Arithmetic application (version 2)
The LinearEquation application (version 2)

Chapter 3

The shapes application (version 3)
The TextFile application (version 3)

Chapter 4

The Bank application (version 4)
The Dictionary application (version 4)
The Directory application (version 4)
The Reverse application (version 4)
The EStore application (version 4)

Chapter 5

The shapes application (version 5)
The JFile application (version 5)
The Bank application (version 5)

Chapter 6

Juno (version 6)

Chapter 7

The Bank application (version 7)
Juno (version 7)

Chapter 8

Strings (version 8)
Terminal (version 8)

Chapter 9

Copy1 and Copy2 (version 9)
The Bank application (version 9)

Chapter 10

JOIPanel (version 10)
JOIApplet (version 10)
Juno (version 10)

Examples

Example 2.1 While1Demo
Example 2.2 While2Demo
Example 2.3 IfDemo
Example 3.1 StaticDemo
Example 3.2 ForDemo
Example 3.3 BreakAndContinueDemo
Example 4.1 CommandLineArgsDemo
Example 4.2 ArrayDemo
Example 4.3 ArrayListDemo
Example 4.4 TreeMapDemo
Example 5.1 SwitchDemo
Example 5.2 OverridingDemo
Example 5.3 EqualsDemo
Example 7.1 RumpelStiltskinDemo
Example 8.1 EscapeDemo
Example 8.2 StringDemo
Example 8.3 ReflectionDemo
Example 9.1 SerializationDemo

Javadoc

The javadoc is organized by chapter and application. To browse the javadoc for an application, simply click on its link below. There is no javadoc for the Examples.

Chapter 1

The Bank application (version 1)
The TrafficLight application (Version 1)
The EStore application (version 1)

Chapter 2

The Change application (version 2)
The Arithmetic application (version 2)
The LinearEquation application (version 2)

Chapter 3

The shapes application (version 3)
The TextFile application (version 3)

Chapter 4

The Bank application (version 4)
The Dictionary application (version 4)
The Directory application (version 4)
The Reverse application (version 4)
The EStore application (version 4)

Chapter 5

The shapes application (version 5)
The JFile application (version 5)
The Bank application (version 5)

Chapter 6

Juno (version 6)

Chapter 7

The Bank application (version 7)
Juno (version 7)

Chapter 8

Strings (version 8)
Terminal (version 8)

Chapter 9

Copy1 and Copy2 (version 9)
The Bank application (version 9)

Chapter 10

JOIPanel (version 10)
JOIApplet (version 10)
Juno (version 10)

Printing

Here the code has been line numbered and assembled into PDF files to facilitate printing. It has been organized into large chunks for bulk printing, into chapters, into chapter/applications, and into individual Program Listings.

Large Chunks

1-10.pdf (Code for Chapters 1 - 10)
1-5.pdf (Code for Chapters 1 - 5)
6-10.pdf (Code for Chapters 6 - 10)
Examples.pdf

Chapters

1.pdf
2.pdf
3.pdf
4.pdf
5.pdf
6.pdf
7.pdf
8.pdf
9.pdf
10.pdf

Chapter/Applications

1-bank.pdf
1-estore.pdf
1-trafficlight.pdf
2-change.pdf
2-linear.pdf
3-shapes.pdf
3-textfiles.pdf
4-bank.pdf
4-dictionary.pdf
4-estore.pdf
4-reverse.pdf
4-textfiles.pdf
5-bank.pdf
5-jfiles.pdf
5-shapes.pdf
6-juno.pdf
7-bank.pdf
7-juno.pdf
8-strings.pdf
8-terminal.pdf
9-bank.pdf
9-copy.pdf
10-joi.pdf
10-joiapplet.pdf
10-juno.pdf

Individual Program Listings

Listing-1.1-BankAccount.pdf
Listing-1.2-Bank.pdf
Listing-1.3-TrafficLight.pdf
Listing-1.4-NextButtonListener.pdf
Listing-1.5-Sequencer.pdf
Listing-1.6-Lens.pdf
Listing-1.7-EStore.pdf
Listing-1.8-Item.pdf
Listing-1.9-ShoppingCart.pdf
Listing-2.1-Change.pdf
Listing-2.2-Temperatures.pdf
Listing-2.3-LinearEquation.pdf
Listing-2.4-IntArithmetic.pdf
Listing-3.1-TextFile.pdf
Listing-3.2-DemoShapes.pdf
Listing-3.3-HLine.pdf
Listing-3.4-Box.pdf
Listing-3.5-TestShapes.pdf
Listing-3.6-InteractiveShapes.pdf
Listing-3.7-TextLine.pdf
Listing-3.8-Screen.pdf
Listing-4.1-Bank.pdf
Listing-4.2-BankAccount.pdf
Listing-4.3-bigbank.in.pdf
Listing-4.4-bigbank.out.pdf
Listing-4.5-littlebank.in.pdf
Listing-4.6-littlebank.out.pdf
Listing-4.7-Reverse.pdf
Listing-4.8-Dictionary.pdf
Listing-4.9-Definition.pdf
Listing-4.10-Lookup.pdf
Listing-4.11-TextFile.pdf
Listing-4.12-Directory.pdf
Listing-4.13-EStore.pdf
Listing-4.14-ShoppingCart.pdf
Listing-4.15-Item.pdf
Listing-4.16-Catalog.pdf
Listing-5.1-Line.pdf
Listing-5.2-HLine.pdf
Listing-5.3-VLine.pdf
Listing-5.4-ShapeOnScreen.pdf
Listing-5.5-JFile.pdf
Listing-5.6-Directory.pdf
Listing-5.7-TextFile.pdf
Listing-5.8-Bank.pdf
Listing-5.9-BankAccount.pdf
Listing-5.10-RegularAccount.pdf
Listing-5.11-CheckingAccount.pdf
Listing-5.12-FeeAccount.pdf
Listing-5.13-Month.pdf
Listing-6.1-Juno.pdf
Listing-6.2-LoginInterpreter.pdf
Listing-6.3-Shell.pdf
Listing-6.4-ShellCommand.pdf
Listing-6.5-MkdirCommand.pdf
Listing-6.6-TypeCommand.pdf
Listing-6.7-HelpCommand.pdf
Listing-6.8-NewfileCommand.pdf
Listing-6.9-ShellCommandTable.pdf
Listing-6.10-JFile.pdf
Listing-6.11-Directory.pdf
Listing-6.12-TextFile.pdf
Listing-6.13-User.pdf
Listing-7.1-Bank.pdf
Listing-7.2-BankAccount.pdf
Listing-7.3-CheckingAccount.pdf
Listing-7.4-SavingsAccount.pdf
Listing-7.5-FeeAccount.pdf
Listing-7.6-RegularAccount.pdf
Listing-7.7-Month.pdf
Listing-7.8-InsufficientFundsException.pdf
Listing-7.9-NegativeAmountException.pdf
Listing-7.10-Juno.pdf
Listing-7.11-LoginInterpreter.pdf
Listing-7.12-Shell.pdf
Listing-7.13-ShellCommand.pdf
Listing-7.14-ShellCommandTable.pdf
Listing-7.15-MkdirCommand.pdf
Listing-7.16-TypeCommand.pdf
Listing-7.17-HelpCommand.pdf
Listing-7.18-NewfileCommand.pdf
Listing-7.19-CdCommand.pdf
Listing-7.20-ListCommand.pdf
Listing-7.21-LogoutCommand.pdf
Listing-7.22-RemoveCommand.pdf
Listing-7.23-JFile.pdf
Listing-7.24-Directory.pdf
Listing-7.25-TextFile.pdf
Listing-7.26-User.pdf
Listing-7.27-JunoException.pdf
Listing-7.28-BadShellCommandException.pdf
Listing-7.29-ExitShellException.pdf
Listing-8.1-Terminal.pdf
Listing-8.2-Password.pdf
Listing-8.3-BadPasswordException.pdf
Listing-9.1-Copy1.pdf
Listing-9.2-Copy2.pdf
Listing-9.3-Bank.pdf
Listing-9.4-BankAccount.pdf
Listing-9.5-Month.pdf
Listing-10.1-JOIPanel.pdf
Listing-10.2-JOIButtonListener.pdf
Listing-10.3-joi.pdf
Listing-10.4-JOIApplet.pdf
Listing-10.4a-joiapplet.pdf
Listing-10.5-Juno.pdf
Listing-10.6-LoginInterpreter.pdf
Listing-10.7-Shell.pdf
Listing-10.8-ShellCommand.pdf
Listing-10.9-ShellCommandTable.pdf
Listing-10.10-MkdirCommand.pdf
Listing-10.11-TypeCommand.pdf
Listing-10.12-HelpCommand.pdf
Listing-10.13-NewfileCommand.pdf
Listing-10.14-CdCommand.pdf
Listing-10.15-ListCommand.pdf
Listing-10.16-GetfileCommand.pdf
Listing-10.17-RemoveCommand.pdf
Listing-10.18-LogoutCommand.pdf
Listing-10.19-JFile.pdf
Listing-10.20-Directory.pdf
Listing-10.21-TextFile.pdf
Listing-10.22-User.pdf
Listing-10.23-JunoException.pdf
Listing-10.24-BadShellCommandException.pdf
Listing-10.25-ExitShellException.pdf
Listing-10.26-ShellCommandNotFoundException.pdf
Listing-10.27-JFileNotFoundException.pdf
Listing-10.28-GUILoginConsole.pdf
Listing-10.29-GUIShellConsole.pdf
Listing-10.30-InterpreterInterface.pdf
Listing-10.31-InputInterface.pdf
Listing-10.32-OutputInterface.pdf
Listing-10.33-JunoTerminal.pdf
Listing-10.34-RemoteConsole.pdf

Individual Examples

Example-2.1-While1Demo.pdf
Example-2.2-While2Demo.pdf
Example-2.3-IfDemo.pdf
Example-3.1-StaticDemo.pdf
Example-3.2-ForDemo.pdf
Example-3.3-BreakAndContinueDemo.pdf
Example-4.1-CommandLineArgsDemo.pdf
Example-4.2-ArrayDemo.pdf
Example-4.3-ArrayListDemo.pdf
Example-4.4-TreeMapDemo.pdf
Example-5.1-SwitchDemo.pdf
Example-5.2-OverridingDemo.pdf
Example-5.3-EqualsDemo.pdf
Example-7.1-RumpelStiltskinDemo.pdf
Example-8.1-EscapeDemo.pdf
Example-8.2-StringDemo.pdf
Example-8.3-ReflectionDemo.pdf
Example-9.1-SerializationDemo.pdf

Compiling

Here the source code for the program listings is unformatted and so suitable for compilation. The code is organized into a hierarchical tree by chapter and application.
joi/1
joi/2
joi/3
joi/4
joi/5
joi/6
joi/7
joi/8
joi/9
joi/10
joi/examples