Contents | |
Foreword | |
Preface to the instructor | |
List of projects discussed in detail in this book | |
Acknowledgements | |
Foundations of object orientation | |
Objects and classes | |
Objects and classes | |
Creating objects | |
Calling methods | |
Parameters | |
Data types | |
Multiple instances | |
State | |
What is in an object? | |
Object interaction | |
Source code | |
Another example | |
Return values | |
Objects as parameters | |
Summary | |
Understanding class definitions | |
Ticket machines | |
Exploring the behavior of a naive ticket machine | |
Examining a class definition | |
Fields, constructors, and methods | |
Fields | |
Constructors | |
Passing data via parameters | |
Assignment | |
Accessor methods | |
Mutator methods | |
Printing from methods | |
Summary of the naive ticket machine | |
Reflecting on the design of the ticket machine | |
Making choices: the conditional statement | |
A further conditional-statement example | |
Local variables | |
Fields, parameters, and local variables | |
Summary of the better ticket machine | |
Self-review exercises | |
Reviewing a familiar example | |
Summary | |
Object interaction | |
The clock example | |
Abstraction and modularization | |
Abstraction in software | |
Modularization in the clock example | |
Implementing the clock display | |
Class diagrams versus object diagrams | |
Primitive types and object types | |
The ClockDisplay source code | |
Class NumberDisplay | |
String concatenation | |
The modulo operator | |
Class ClockDisplay | |
Objects creating objects | |
Multiple constructors | |
Method calls | |
Internal method calls | |
External method calls | |
Summary of the clock display | |
Another example of object interaction | |
The mail system example | |
The this keyword | |
Using a debugger | |
Setting breakpoints | |
Single stepping | |
Stepping into methods | |
Method calling revisited | |
Summary | |
Grouping objects | |
Grouping objects in flexible-size collections | |
A personal notebook | |
A first look at library classes | |
An example of using a library | |
Object structures with collections | |
Generic classes | |
Numbering within collections | |
Removing an item from a collection | |
Processing a whole collection | |
The for-each loop | |
The while loop | |
Iterating over a collection | |
Index access versus iterators | |
Summary of the notebook example | |
Another example: an auction system | |
The Lot class | |
The Auction class | |
Anonymous objects | |
Using collections | |
Flexible collection summary | |
Fixed-size collections | |
A log-file analyzer | |
Declaring array variables | |
Creating array objects | |
Using array objects | |
Analyzing the log file | |
The for loop | |
Summary | |
More sophisticated behavior | |
Documentation for library classes | |
The TechSupport system | |
Exploring the TechSupport system | |
Reading the code | |
Reading class documentation | |
Interfaces versus imple | |
Table of Contents provided by Publisher. All Rights Reserved. |
The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.
The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.