
Beginning Java Objects: From Concepts to Code / Edition 1
by Jacquie BarkerISBN-10: 1590591461
ISBN-13: 9781590591468
Pub. Date: 07/01/2003
Publisher: Apress
Export author Barker covers information key for proficiency with an OO programming language like Java, and shows how to really create reusable code and extensible applications.
Overview
Export author Barker covers information key for proficiency with an OO programming language like Java, and shows how to really create reusable code and extensible applications.
Product Details
- ISBN-13:
- 9781590591468
- Publisher:
- Apress
- Publication date:
- 07/01/2003
- Edition description:
- 2000
- Pages:
- 688
- Product dimensions:
- 7.00(w) x 9.25(h) x 1.45(d)
Table of Contents
Introduction | 1 | |
Goals for this Book | 1 | |
Why Is Understanding Objects So Critical To Being a Successful OO Programmer? | 2 | |
Who Is This Book Written For? | 3 | |
What if You are Interested in Object Modeling, But Not Necessarily in Java Programming? | 5 | |
How This Book is Organized | 5 | |
Part 1 | 5 | |
Part 2 | 5 | |
Part 3 | 5 | |
Conventions | 6 | |
Which Version of Java is this Book Based On? | 6 | |
A Final Thought Before We Get Started | 7 | |
Tell Us What You Think | 7 | |
Student Registration System Case Study | 8 | |
Part 1 | The ABC's of Objects | 11 |
Chapter 1 | A Little Taste of Java | 13 |
Why Java? | 14 | |
Java Language Basics | 23 | |
Getting 'Hands On' With Java | 43 | |
Summary | 44 | |
Exercises | 45 | |
Chapter 2 | Abstraction and Modeling | 47 |
Simplification Through Abstraction | 47 | |
Generalization Through Abstraction | 48 | |
Reuse of Abstractions | 52 | |
Inherent Challenges | 53 | |
Summary | 55 | |
Exercises | 56 | |
Chapter 3 | Objects and Classes | 59 |
What Is an Object? | 59 | |
Data/State/Attributes | 60 | |
Behavior/Operations/Methods | 61 | |
Classes | 63 | |
Instantiation | 64 | |
Encapsulation | 66 | |
Objects vs. Database Records | 66 | |
Classes as Abstract Data Types | 67 | |
Instantiating Objects: A Closer Look | 69 | |
Objects as Attributes | 73 | |
Composite Classes | 74 | |
Three Distinguishing Features of an Object-Oriented Programming Language | 77 | |
Summary | 77 | |
Exercises | 78 | |
Chapter 4 | Object Interactions | 81 |
Events Drive Object Collaboration | 81 | |
Method Signatures | 83 | |
Message Passing and Dot Notation | 87 | |
Accessing Attributes via Dot Notation | 88 | |
Delegation | 89 | |
Access to Objects | 90 | |
Objects as Clients and Servers/Agents | 92 | |
Information Hiding/Visibility | 93 | |
Accessor and Modifier Methods | 96 | |
Exceptions to the Public/Private Rule | 99 | |
Encapsulation Revisited | 102 | |
Constructors | 107 | |
Summary | 109 | |
Exercises | 110 | |
Chapter 5 | Relationships Between Objects | 113 |
Associations and Links | 113 | |
Rules for Deriving Classes: The 'Do's' | 130 | |
Rules for Deriving Classes: The 'Don'ts' | 133 | |
A Few Words About Multiple Inheritance | 135 | |
Three Distinguishing Features of an Object-Oriented Programming Language, Take 2 | 139 | |
Summary | 139 | |
Exercises | 140 | |
Chapter 6 | Collections of Objects | 143 |
What are Collections? | 143 | |
Inventing Your Own Collection Types | 153 | |
Collections as Method Return Types | 156 | |
Collections of Supertypes | 157 | |
Composite Classes, Revisited | 158 | |
Summary | 160 | |
Exercises | 161 | |
Chapter 7 | Some Final Concepts | 163 |
What is Polymorphism? | 164 | |
Three Distinguishing Features of an Object-Oriented Programming Language | 169 | |
Abstract Classes | 169 | |
Interfaces | 175 | |
Static Attributes | 179 | |
Summary | 185 | |
Exercises | 186 | |
Part 2 | Object Modelling 101 | 189 |
Chapter 8 | The Object Modeling Process in a Nutshell | 191 |
The 'Big Picture' Goal of Object Modeling | 191 | |
Our Object Modeling Process, in a Nutshell | 194 | |
Summary | 197 | |
Exercises | 198 | |
Chapter 9 | Formalizing Requirements through Use Cases | 201 |
What are Use Cases? | 202 | |
Actors | 203 | |
Specifying Use Cases | 207 | |
Matching Up Use Cases with Actors | 208 | |
To Diagram or Not to Diagram? | 209 | |
Summary | 210 | |
Exercises | 210 | |
Chapter 10 | Modeling the Static/ Data Aspects of the System | 213 |
Identifying Appropriate Classes | 214 | |
Producing a Data Dictionary | 225 | |
Determining Associations Between Classes | 226 | |
Identifying Attributes | 230 | |
UML Notation: Modeling the Static Aspects of an Abstraction | 230 | |
Object Diagrams | 241 | |
Information 'Flows' Along the Association 'Pipeline' | 244 | |
'Mixing and Matching' Relationship Notations | 248 | |
Association Classes | 250 | |
Our 'Completed' Student Registration System Class Diagram | 252 | |
Metadata | 258 | |
Comparing UML and OMT Notations | 259 | |
Summary | 260 | |
Exercises | 261 | |
Chapter 11 | Modeling the Dynamic/Behavioral Aspects of the System | 263 |
How Behavior Affects State | 264 | |
Events | 266 | |
Scenarios | 268 | |
Sequence Diagrams | 272 | |
Using Sequence Diagrams to Determine Methods | 277 | |
Collaboration Diagrams | 279 | |
Revised SRS Class Diagram | 280 | |
Summary | 281 | |
Exercises | 282 | |
Chapter 12 | Wrapping Up Our Modeling Efforts | 285 |
Testing Your Model | 285 | |
A Shortcoming in our Model | 286 | |
Reusing Models: A Word About Design Patterns | 288 | |
Summary | 290 | |
Exercises | 291 | |
Part 3 | Translating an Object 'Blueprint' into Java Code | 293 |
Chapter 13 | A Deeper Look At Java | 295 |
Setting Up a Java Programming Environment | 296 | |
Anatomy of a Java Program, Revisited | 297 | |
Anatomy of a Java Class | 305 | |
Strings as Objects | 311 | |
Java Expressions, Revisited | 314 | |
Printing to the Screen, Revisited | 316 | |
Arrays, Revisited | 316 | |
Java Exception Handling | 320 | |
Reading Data from the Command Line | 322 | |
Accepting Keyboard Input | 324 | |
Using constructors | 326 | |
Using the 'this' Keyword for Object Self-Referencing | 330 | |
Object Deletion and Garbage Collection | 333 | |
Inheritance and Java | 335 | |
Java's Collection Classes | 343 | |
The 'final' Keyword | 353 | |
Abstract Classes and Interfaces, Revisited | 356 | |
Object Identities | 358 | |
The toString() Method | 364 | |
Inner Classes | 365 | |
Summary | 368 | |
Exercises | 370 | |
Chapter 14 | Transforming Your Model into Java Code | 375 |
Suggestions for Getting the Maximum Value out of This and Subsequent Chapters | 376 | |
The SRS Class Diagram, Revisited | 376 | |
Debugging Tip | 421 | |
Summary | 423 | |
Exercises | 424 | |
Chapter 15 | Rounding Out Your Application, Part 1 - Adding File Persistence | 427 |
What is File Persistence? | 428 | |
CollectionWrapper (Encapsulating Collections; Reading from an ASCII File) | 436 | |
Summary | 468 | |
Exercises | 469 | |
Chapter 16 | Rounding Out Your Application, Part 2 - Adding a Graphical User Interface | 471 |
Java GUIs: a Primer | 472 | |
Java Event Handling | 522 | |
Selecting an Item from a JList | 538 | |
More Container Types: JDialog and JOptionPane | 545 | |
One Step Dialogs with JOptionPane | 550 | |
SRS, Take 3: Adding a GUI | 553 | |
Summary | 597 | |
Exercises | 598 | |
Chapter 17 | Next Steps | 601 |
Jacquie's 'Tried and True' Method for Learning Java Properly | 602 | |
Recommended Reading | 603 | |
Your Comments, Please! | 604 | |
Part 4 | Appendices | 607 |
Appendix A | Suggestions for Using This Book as a Textbook | 609 |
Appendix B | Alternative Case Studies | 613 |
Case Study #1 | Conference Room Reservation System | 613 |
Case Study #2 | Blue Skies Airline Reservation System | 615 |
Appendix C | Setting Up a Basic Object Modeling/Java Environment | 619 |
Object Modeling Tools | 619 | |
The Java Software Developer's Kit | 619 | |
'Odds and Ends' Tips for Getting Java Working | 620 | |
Using the On-Line Java Documentation with Windows | 625 | |
Special Tips for Using DOS Under Microsoft Windows | 626 | |
Appendix D | SRS Source Code | 631 |
Downloading the Example Code | 631 | |
Appendix E | Note to Experienced C++ Programmers | 635 |
Appendix F | How Polymorphism Works | 641 |
Index | 651 |
Customer Reviews
Average Review: