LIST OF EXAMPLES 

Chapter 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15

NB: Use shift-click to save to disk or just click to view

Chapter 1 Introduction

The Nature Conservation Project


Chapter 2 Simple programs

2.1 Welcome (Welcome.java)
2.2 Drawing a flag (FlagMaker1.java)
2.3 Curio Store (CurioStore1.java)
2.4 Displaying a warning (DisplayWarning.java)
2.5 Curio shop table ( no file )
2.6 Fleet timetables (FleetCalculator.java)


Chapter 3 Types and methods

3.1 Math class investigation (RandomInvestigation.java)
3.2 Multiple labels (LotsaLabels.java)
3.3 Conversion table (TemperatureTable.java)
3.4 A rainfall histogram (RainfallHistogram.java)
3.5 Selling from the curio store (CurioStore2.java)
3.6 Large conversion table (LargeTemperatureTable.java)
CS1 Pizza Delivery 2U (PizzaDelivery1.java, PizzaDelivery2.java)


Chapter 4 Input and output

4.1 Greetings (Greetings.java)
4.2 Testing the Time class (TimeDisplay.java)
4.3 Large temperature table formatted
4.4 Alternative greetings programs (Greetings2.java, Greetings3.java)
4.5 The highest number (HighestValue.java)
4.6 Averaging readings (ReadingsAverages.java)
4.7 Part codes (PartCodes.java, parts.dat)
4.8 Part codes with exceptions (PartCodesMany.java, parts.dat)
4.9 Secure file opener (Filer.java)
4.10 Olympic medals (Olympics.java, medals.dat)


Chapter 5 Controlling the flow

5.1 Highest common factor (HCFRepeat.java)
5.2 Curio Store open all day (CurioStore3.java)
5.3 Checking on stock availability (CurioStore3a.java)
5.4 Printing out the character set (TestUnicode.java)
5.5 Exchange rates (CurioStore3b.java)
CS2 Rock scissors paper game (RSPGame.java, PlayGame.java)


Chapter 6 Arrays and tables

6.1 Frequency count (Frequencies.java)
6.2 Diving competitions (Dive.java, DivingCompetition.java)
6.3 Statistical analysis (Stats.java)
6.4 The lifetime of light bulbs (LightBulbAnalysis.java)
6.5 Gold exploration (GoldExploration.java, mali.dat)
6.6 Rainfall statistics (Weather.java, rain.dat)
6.7 Sorting words in a file (SortWords.java, sort.java)
6.8 Currency converter (Converter.java, Rates.java, rates.dat)


Chapter 7 Formatting

7.1 Removing double spaces (Spaces.java)
7.2 Counterfeit cheques (ChequeDetector.java)
Inside the Stream class (Stream.java)
7.3 Where am I? (WhereAmI.java)
7.4 Currency conversion table (Currency.java, rates.dat)
7.5 Shopping days (Shopping.java)
7.6 Formatting and parsing dates (TestDates.java, CustomDates.java)
7.7 Testing time zones (WorldTime.java)
7.8 Multilingual dates (VaryDates.java)


Chapter 8 Objects at work

8.1 Nelson's Coffee Shop (Batch.java, Coffee.java, CoffeeShop.java, coffee.dat)
8.2 Illustrating a list (LinkTest.java, names.dat)
CS3 Nelson's Coffee Shop (Batch.java, Coffee2.java, CoffeeShop2.java, coffee.dat, orders.data)


Chapter 9 Abstraction and inheritance

9.1 The Nature hierarchy (TestNature.java)
9.2 Sorting (SortTest.java, SortTestInt.java, Countries.data, Country.java, Sort.java, Sortable.java)
9.3 Illustrating Serializable (TestFiles.java, names.dat, mydata)
CS4 Veterinary Tags (Tags.java, VeterinaryTags.java, XTags.java, tags.data)


Chapter 10 Graphics and user interfaces

10.1 Virus warning (VirusWarning.java)
10.2 A weather chart (WeatherChart.java, rain.dat)
10.3 Many flags (FlagMaker2.java)
10.4 Warning with two responses (ButtonTest.java)
10.5 Traffic lights (Traffic0.java)
Inside the Graph class (Graph.java)


Chapter 11 Event-driven programming

11.1 Traffic lights with buttons (Traffic1.java)
11.2 Traffic light calibration
11.3 Currency converter with a GUI (ConverterGUI.java, Rates.java, Rates.dat)
CS5 The Flag Designer (FlagMakerGUI.java)
CS6 Supermarket Till (Till.java)
CS7 The Converter with Swing (ConverterSwing.java, Elephant.gif)


Chapter 12 Applets in action

Clicking on the HTML file runs the applet. To save the source, right click (PC) or hold down the mouse button (Mac)
 
12.1 Virus warning applet (WarningApplet.java, WarningApplet.html)
12.2 Supermarket till applet (TillApplet.java, Till.html)
12.3 The newspaper competition (Competition.java, Competition.html)
12.4 Catching the duke (CatchM.java, duke.gif, CatchM.html)
CS8 The Nature Conservation Project (TreesAp.java, Nature.html, Animals.html, Trees.html, images)


Chapter 13 Multithreading

13.1 Drawing spots (SpotTest.html, SpotTest.java)
13.2 Traffic lights flashing (Traffic2.java, SetOfLights.java)
13.3 Traffic lights for walking (Traffic3.java, SetOfLights.java)
13.4 Car parks for a viewpoint (CarPark.html, CarPark.java, reserve.jpg)
Inside the Display class (Display.java)
CS9 Walkman Hire (WalkmanHire.java, Counter.java, Museum.java, Visitors.java)


Chapter 14 Networking

14.1 Converter applet (Converter.html, ConverterGUIApplet.java, Rates.java, rates.data)
14.2 Fetching an image (FetchImage.java)
14.3 Opening a port (Ports.java)
14.4 Creating an ATM server (ATMServer.java)
14.5 The converter database (ConverterDatabase.java, SetUpDataBase.java, Rates.java, rates.data)
14.6 Magic number server (MagicNumber.java, MagicNumberClient.java, MagicNumberServer.java, Transferable.java)
CS10 The Chatter system (ChatHandler.java, ChatServer.java)
CS11 The Airport Announcer system

- AirportMessage.java, AirportMessageClient.java, AirportMessageServer.java
- Announcer.java, AnnouncerClient.java, AnnouncerServer.java
- Checkin.java, Monitor.java
- Checkin.html, checkin.html source
- Applets.html, Applets.html source
- index.html, index.html source
- Contents.html, Contents.html source

Chapter 15 Data structures and algorithms

15.1 Animated binary search (Animated.java)  and Quicksort demonstration  (QuickSortTest.java)
15.2 Reversing a sentence (Reverser.java)
15.3 Doctor's waiting room (WaitingRoom.java, Queue.java, QueueException.java)
15.4 Photograph line-up (Photo.java, Student.java, students.dat)
15.5 Training schedules (Training.java)


Chapter 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15