Java an Object First Approach - Contents


Chapters

Chapter 1 Two Initial Applications.
Chapter 2 An overview of classes.
Chapter 3 The start of the Counters class hierarchy.
Chapter 4 The completion of the Counters hierarchy.
Chapter 5 The RoomMonitor class and MoneyRegister hierarchy.
Chapter 6 The BasicMenu class.
Chapter 7 The AdaptingMenu class.
Chapter 8 Concurrent processes.
Chapter 9 Keyboard input and formatted output.
Chapter 10 The JulianDate Hierarchy.
Chapter 11 Testing Software.
Chapter 12 Streams.
Chapter 13 Standard Iterative Data Structures.
Chapter 14 Developer Supplied Data Structures.
Chapter 15 Dynamic and recursive data structures.
Chapter 16 Graphical User Interfaces.


Chapter 1 Two Initial Applications.

1.1 The UltimateQuestion application.
1.2 The UltimateAnswer application.
1.3 The TheAnswer class.
1.4 The UltimateAnswer class.
1.5 Action designs using JSP notation.
1.6 Names in programs.
Chapter 1 summary.
Exercises for Chapter 1.

Error! Hyperlink reference not valid..


Chapter 2. An overview of classes.

2.1 The design of the Friend class.
2.2 The first part of the implementation of the Friend class.
2.3 The start of the demonstration client.
2.4 The remaining actions of the Friend class.
2.5 The completion of the FriendDemo class.
Chapter 2 Summary.
Exercises for Chapter 2.

Error! Hyperlink reference not valid..


Chapter 3 The start of the Counters class hierarchy.

3.1 Class hierarchies.
3.2 The Counters class hierarchy.
3.3 The design of the BasicCounter class.
3.4 The implementation of the BasicCounter class.
3.5 Demonstrating the BasicCounter class.
3.6 The design of the LimitedCounter class.
3.7 The implementation of the LimitedCounter class.
3.8 Demonstrating the LimitedCounter class.
Chapter 3 Summary.
Exercises for Chapter 3.

Error! Hyperlink reference not valid..


Chapter 4 The completion of the Counters hierarchy.

4.1 The design and implementation of the RollOverCounter class.
4.2 The RollOverCounterDemonstration client program.
4.3 The design, implementation and demonstration of the StoppingCounter class.
4.4 The design and implementation of the WarningCounter class.
4.5 The design and implementation of the WarningDemonstration client program.
4.6 The Counters hierarchy in retrospect.
Chapter 4 Summary.
Exercises for Chapter 4.

Error! Hyperlink reference not valid..


Chapter 5 The RoomMonitor class and MoneyRegister hierarchy.

5.1 The RoomMonitor design and first implementation.
5.2 The RoomMonitorDemonstration client.
5.3 A second implementation of the RoomMonitor class.
5.4 The MoneyRegister hierarchy & the MoneyRegister implementation.
5.5 The MoneyRegisterDemonstration program client.
5.6 The MultipleRegister design and implementation.
5.7 The MultipleRegisterDemonstration program client.
5.8 Development by extension.
Chapter 5 Summary.
Exercises for Chapter 5.

Error! Hyperlink reference not valid..


Chapter 6 The BasicMenu class.

6.1 The BasicMenu user interface.
6.2 The BasicMenu class diagram.
6.3 The BasicMenu data attributes.
6.4 The BasicMenu constructor.
6.5 The BasicMenu showMenu() action, and its supporting actions.
6.6 The BasicMenu getValidatedMenuChoice() action.
6.7 The BasicMenu offerMenuAsChar() and offerMenuAsInt() actions.
6.8 The BasicMenuDemonstration clients.
Chapter 6 Summary.
Exercises for Chapter 6.

Error! Hyperlink reference not valid..


Chapter 7 The AdaptingMenu class.

7.1 The AdaptingMenu class diagram, data attributes and constructor.
7.2 The enableMenuOption(), disableMenuOption() and showMenu() actions.
7.3 The offerMenuAsInt() action.
7.4 The AdaptingMenu demonstration client.
7.5 The RoomMenuDemonstration client.
7.6 Menu driven user interfaces.
Chapter 7 Summary.
Exercises for Chapter 7.

Error! Hyperlink reference not valid..


Chapter 8 Concurrent processes.

8.1 An initial concurrent example.
8.2 Synchronisation of data attributes.
8.3 Synchronisation of actions.
8.4 Problems with concurrency .
Chapter 8 Summary.
Exercises for Chapter 8.

Error! Hyperlink reference not valid..


Chapter 9 Keyboard input and formatted output.

9.1 The SimpleInput and ValidatedInput class hierarchy.
9.2 The design and implementation of the SimpleInput class.
9.3 The design and implementation of the ValidatedInput class.
9.4 The ValidatedInputDemonstration client .
9.5 The OutputFormatter class formatLong() action.
9.6 The OutputFormatter class formatDouble() action.
9.7 Exceptions in Java.
Chapter 9 Summary.
Exercises for Chapter 9.

Error! Hyperlink reference not valid..


Chapter 10 The JulianDate hierarchy.

10.1 The JulianDates class hierarchy.
10.2 The BasicJulianDates class.
10.3 The ArithmeticJulianDates class.
10.4 The JulianDate class.
Chapter 10 Summary.
Exercises for Chapter 10.

Error! Hyperlink reference not valid..


Chapter 11 Testing Software.

11.1 Testing the BasicJulianDate default constructor.
11.2 Testing the BasicJulianDate alternative constructor.
11.3 Relational and inverse testing of the ArithmeticJulianDate actions.
11.4 Composite and interactive testing of the remaining facilities.
11.5 White box considerations.
11.6 Comparison of methods and techniques.
Chapter 11 Summary.
Exercises for Chapter 11.

Error! Hyperlink reference not valid..


Chapter 12 Streams.

12.1 An initial example.
12.2 The type application.
12.3 An output file stream.
12.4 Homogenous binary streams.
12.5 Heterogeneous binary streams.
Chapter 12 Summary.
Exercises for Chapter 12.

Error! Hyperlink reference not valid..


Chapter 13 Standard Iterative Data Structures.

13.1 Two dimensional arrays.
13.2 Ragged arrays.
13.3 Vectors.
13.4 Iterator classes.
13.5 Hashtables.
Chapter 13 Summary.
Exercises for Chapter 13.

Error! Hyperlink reference not valid..


Chapter 14 Developer Supplied Data Structures.

14.1 The abstract UnorderedList class.
14.2 The Queue class.
14.3 The Stack class.
14.4 The Generics interfaces.
14.5 The OrderedList constructor and add() actions.
14.6 The OrderedList remaining actions.
Chapter 14 Summary.
Exercises for Chapter 14.

Error! Hyperlink reference not valid..


Chapter 15. Dynamic and recursive data structures.

15.1 Linked Lists.
15.2 The LinkedList class diagram and ListNode class.
15.3 The LinkedList constructor and add() actions.
15.4 The linked list obtain(), remove() and isPresent() actions.
15.5 The remaining LinkedList actions and the LinkedListEnumeration class.
15.6 Binary Trees.
15.7 The TreeNode class and BinaryTree add action.
15.8 The BinaryTree obtain(), isPresent() and toString() actions.
15.9 The remaining BinaryTree actions.
15.10 LinkedLists, and BinaryTrees compared.
Chapter 15 Summary.
Exercises for Chapter 15.

Error! Hyperlink reference not valid..


Chapter 16 Graphical User Interfaces.

16.1 The visual and behavioural design of the GUI.
16.2 The component instance hierarchy.
16.3 The RoomMonitorGUI class declaration and init() action.
16.4 The remaining actions, apart from main().
16.5 Executing the application.
16.6 Application, presentation and translation layers.
Chapter 16 Summary.
Exercises for Chapter 16.

Error! Hyperlink reference not valid..


Appendix A1: Java's integer types.
Appendix A2: Java's floating point types.
Appendix A3: Java's boolean types.
Appendix A4: Java's character types.
Appendix A5: Java's String types.

Error! Hyperlink reference not valid..


Zipped archive of all source code.


JFL home page.