
Java and Object Orientation
An Introduction
By:Â John Hunt
Paperback | 15 March 2002 | Edition Number 2
At a Glance
516 Pages
Revised
25.4 x 17.78 x 3.18
Paperback
$84.99
or 4 interest-free payments of $21.25 with
 orÂShips in 5 to 7 business days
| Introduction to Object Orientation | |
| Introduction to Object Orientation | p. 3 |
| Introduction | p. 3 |
| Programming Paradigms | p. 3 |
| Revolution Versus Evolution | p. 4 |
| Why Learn a New Programming Paradigm? | p. 5 |
| Pedigree of Object-Oriented Languages | p. 10 |
| Fundamentals of Object Orientation | p. 11 |
| The Basic Principles of Object Orientation | p. 12 |
| Encapsulation | p. 13 |
| Inheritance | p. 14 |
| Abstraction | p. 16 |
| Polymorphism | p. 17 |
| Summary | p. 18 |
| Further Reading | p. 19 |
| Elements of Object Orientation | p. 21 |
| Introduction | p. 21 |
| Terminology | p. 21 |
| Types of Hierarchy | p. 23 |
| The Move to Object Technology | p. 25 |
| Summary | p. 25 |
| Exercises | p. 26 |
| Further Reading | p. 26 |
| Constructing an Object-Oriented System | p. 27 |
| Introduction | p. 27 |
| The Application: Windscreen Wipe Simulation | p. 27 |
| Where Do We Start? | p. 28 |
| Identifying the Objects | p. 29 |
| Identifying the Services Or Methods | p. 30 |
| Refining the Objects | p. 31 |
| Bringing it All Together | p. 31 |
| Where Is the Structure? | p. 34 |
| Summary | p. 35 |
| Exercise | p. 35 |
| Further Reading | p. 36 |
| Introduction to the Java Language | |
| A Brief History of Time, the Universe and Java | p. 39 |
| Introduction | p. 39 |
| What Is Java? | p. 39 |
| Objects in Java | p. 40 |
| History | p. 40 |
| Commercial Versions of Java | p. 41 |
| The Java Environment | p. 41 |
| Further Reading | p. 45 |
| Where to Get More Information | p. 45 |
| A Little Java | p. 47 |
| Introduction | p. 47 |
| Setting up the Development Environment | p. 48 |
| Compiling and Executing Java | p. 48 |
| Using the Java Documentation Tool | p. 50 |
| Summary | p. 51 |
| Further Reading | p. 51 |
| Java Building Blocks | p. 53 |
| Introduction | p. 53 |
| The Basics of the Language | p. 53 |
| Classes | p. 54 |
| Method Definitions | p. 61 |
| Interface Definitions | p. 64 |
| Java Constructs | p. 67 |
| Introduction | p. 67 |
| Numbers and Numeric Operators | p. 67 |
| Characters and Strings | p. 69 |
| Assignments | p. 70 |
| Variables | p. 71 |
| Messages and Message Selectors | p. 73 |
| Summary | p. 74 |
| Further Reading | p. 74 |
| An Example Java Class | p. 75 |
| Introduction | p. 75 |
| Defining a Class | p. 75 |
| Defining a Method | p. 76 |
| Creating an Instance | p. 78 |
| Java and Object Orientation | |
| Classes, Inheritance and Abstraction | p. 83 |
| Introduction | p. 83 |
| Classes Revisited | p. 83 |
| Inheritance in Classes | p. 86 |
| Abstract Classes | p. 89 |
| Constructors and Their Use | p. 90 |
| The main Method | p. 91 |
| Encapsulation and Polymorphism | p. 93 |
| Introduction | p. 93 |
| Encapsulation | p. 93 |
| Packages | p. 94 |
| Polymorphism | p. 97 |
| Inner Classes and Reflection | p. 101 |
| Introduction | p. 101 |
| What Are Inner Classes? | p. 101 |
| Types of Inner Class | p. 103 |
| How and When Should I Use Inner Classes? | p. 105 |
| The Reflection API | p. 107 |
| Data Structures | p. 113 |
| Introduction | p. 113 |
| Data Structure Classes | p. 113 |
| The Abstract Class Dictionary | p. 114 |
| The Hashtable Class | p. 114 |
| The Vector Class | p. 115 |
| The Stack Class | p. 118 |
| A Queue Class | p. 118 |
| Enumeration | p. 118 |
| Arrays | p. 119 |
| Memory Management | p. 124 |
| Exercise: Vectors | p. 126 |
| Summary | p. 127 |
| Further Reading | p. 127 |
| The Collections API | p. 129 |
| Introduction | p. 129 |
| What Is in the Collections API? | p. 129 |
| Collection Interfaces | p. 131 |
| Abstract Implementations | p. 135 |
| Concrete Implementations | p. 137 |
| The Collections Class | p. 142 |
| Iteration Over Collections | p. 143 |
| Array Sorting and Searching | p. 144 |
| Choosing a Collection class | p. 144 |
| Summary | p. 144 |
| Further Java | |
| Control and Iteration | p. 149 |
| Introduction | p. 149 |
| Control Structures | p. 149 |
| Iteration | p. 153 |
| Recursion | p. 155 |
| Summary | p. 156 |
| An Object-Oriented Organizer | p. 157 |
| Introduction | p. 157 |
| The Organizer Class | p. 157 |
| The Class Definition | p. 158 |
| The Updating Protocol | p. 158 |
| The Accessing Protocol | p. 159 |
| The main Method | p. 160 |
| Exercise - the Financial Manager Project | p. 161 |
| Streams and Files | p. 163 |
| Introduction | p. 163 |
| Streams | p. 163 |
| Files | p. 171 |
| Accessing a File | p. 173 |
| Creating a File | p. 175 |
| Input From the Console | p. 176 |
| Summary | p. 177 |
| Serialization | p. 179 |
| Introduction | p. 179 |
| The ObjectOutputStream Class | p. 180 |
| The ObjectInputStream Class | p. 180 |
| The Serializable Interface | p. 181 |
| The transient Keyword | p. 182 |
| The Externalizable Interface | p. 182 |
| A Simple Serialization Application | p. 183 |
| Exercise - Using Files With the Financial Manager | p. 186 |
| Summary | p. 188 |
| Observers and Observables | p. 189 |
| Introduction | p. 189 |
| The Dependency Mechanism | p. 189 |
| The Observer Interface | p. 193 |
| Extending the Dependency Example | p. 194 |
| Exercise - Dependency and the Financial Manager | p. 196 |
| Summary | p. 196 |
| Graphical Interfaces and Applets | |
| Graphic Programming Using the Abstract Window Toolkit | p. 199 |
| Introduction | p. 199 |
| Windows as Objects | p. 199 |
| Windows in Java | p. 200 |
| The Abstract Window Toolkit | p. 200 |
| The Component Class | p. 201 |
| The Container Class | p. 203 |
| The Panel Class | p. 204 |
| The Frame Class | p. 204 |
| The Graphics Class | p. 205 |
| A Worked Graphical Application | p. 207 |
| Further Reading | p. 210 |
| User Interface Programming | p. 211 |
| Introduction | p. 211 |
| The Event Delegation Model | p. 211 |
| GUI Component Classes | p. 215 |
| Additional AWT Classes | p. 220 |
| Managing Component Layout | p. 221 |
| Introduction | p. 221 |
| The Flowlayout Manager | p. 221 |
| The Borderlayout Manager | p. 222 |
| The GridLayout Manager | p. 223 |
| The GridBayLayout Manager | p. 224 |
| The CardLayout Manager | p. 227 |
| A Simple GUI Example | p. 227 |
| Putting the Swing into Java | p. 231 |
| Introduction | p. 231 |
| Swing, the JFC and the JDK | p. 231 |
| What Is the MVC? | p. 232 |
| Swinging the MVC Into Action | p. 233 |
| Transitioning to Swing | p. 234 |
| A Swinging Gallery | p. 237 |
| Things to Remember | p. 242 |
| Online References | p. 243 |
| A GUI Case Study | p. 245 |
| Introduction | p. 245 |
| The Class Structure | p. 248 |
| The Instance Structure | p. 255 |
| Exercise - A GUI for the Financial Manager | p. 255 |
| Summary | p. 256 |
| Further Reading | p. 256 |
| The Lowdown on Layouts, Borders and Containers | p. 257 |
| Introduction | p. 257 |
| Containers in Swing | p. 257 |
| Layouts for Containers | p. 258 |
| Borders in Swing | p. 262 |
| Using Panels, Layouts and Borders | p. 270 |
| Planning a Display | p. 270 |
| Online References | p. 271 |
| Combining Graphics and GUI Components | p. 273 |
| Introduction | p. 273 |
| The SwingDraw Application | p. 273 |
| The Structure of the Application | p. 273 |
| The Interactions Between Objects | p. 277 |
| The Classes | p. 281 |
| Exercises | p. 298 |
| Summary | p. 299 |
| Swing Data Model Case Study | p. 301 |
| Introduction | p. 301 |
| The JTree Swing Component | p. 301 |
| The JTree Package | p. 305 |
| Building the Data Model | p. 307 |
| Building the GUI Application | p. 308 |
| Online Resources | p. 314 |
| Java: Speaking in Tongues | p. 315 |
| Introduction | p. 315 |
| Locale | p. 316 |
| Properties Objects | p. 317 |
| ResourceBundle Introduction | p. 318 |
| Formatting Output | p. 321 |
| Summary | p. 322 |
| Online References | p. 322 |
| The CUTting Edge | p. 323 |
| Introduction | p. 323 |
| The Simple Editor | p. 323 |
| Cutting and Copying Data | p. 324 |
| Pasting Data | p. 325 |
| Drag and Drop | p. 327 |
| Summary | p. 331 |
| Internet Working | |
| Sockets in Java | p. 335 |
| Introduction | p. 335 |
| Socket to socket communication | p. 335 |
| Setting Up a Connection | p. 335 |
| An Example Client-Server Application | p. 336 |
| Applets and the Internet | p. 341 |
| Introduction | p. 341 |
| Applet Security | p. 342 |
| The Applet Class | p. 342 |
| Working With Applets | p. 344 |
| The Account Applet | p. 344 |
| A Brief Introduction to HTML | p. 346 |
| The [left angle bracket]applet[right angle bracket] HTML Tag | p. 347 |
| Accessing HTML Files | p. 348 |
| Swing and Applets | p. 349 |
| Exercise: Tic-Tac-Toe Applet | p. 349 |
| Summary | p. 350 |
| Further Reading | p. 350 |
| Servlets: Serving Java up on the Web | p. 353 |
| Introduction | p. 353 |
| How Servlets Work | p. 354 |
| The Structure of the Servlet API | p. 355 |
| An Example Servlet | p. 356 |
| Why Use Servlets? | p. 359 |
| Summary | p. 360 |
| Further Reading | p. 360 |
| Java Server Pages | p. 361 |
| Introduction | p. 361 |
| What Is a JSP? | p. 361 |
| A Very Simple JSP | p. 363 |
| The Components of a JSP | p. 364 |
| Making JSPs Interactive | p. 367 |
| Why Use JSPs? | p. 368 |
| Problems With JSPs | p. 368 |
| Java Database Connectivity | p. 371 |
| Introduction | p. 371 |
| What Is JDBC? | p. 371 |
| What the Driver Provides | p. 373 |
| Registering Drivers | p. 373 |
| Opening a Connection | p. 374 |
| Obtaining Data From a Database | p. 375 |
| Creating a Table | p. 377 |
| Applets and Databases | p. 378 |
| Mini SQL | p. 379 |
| Further Reading | p. 379 |
| Online References | p. 379 |
| Java Development | |
| Java Style Guidelines | p. 383 |
| Introduction | p. 383 |
| Code Layout | p. 383 |
| Variables | p. 383 |
| Classes | p. 386 |
| Interfaces | p. 388 |
| Enumerated Types | p. 388 |
| Methods | p. 389 |
| Scoping | p. 392 |
| Statement Labels | p. 393 |
| Exception Handling | p. 395 |
| Introduction | p. 395 |
| What Is an Exception? | p. 395 |
| What Is Exception Handling? | p. 396 |
| Throwing an Exception | p. 397 |
| Catching an Exception | p. 398 |
| Defining an Exception | p. 400 |
| Concurrency | p. 403 |
| Introduction | p. 403 |
| Concurrent Processes | p. 403 |
| Threads | p. 404 |
| The Thread Class | p. 405 |
| A Time Slicing Example | p. 408 |
| Object-Oriented Design | |
| Object-Oriented Analysis and Design | p. 415 |
| Introduction | p. 415 |
| Object-Oriented Design Methods | p. 415 |
| Object-Oriented Analysis | p. 415 |
| The Booch Method | p. 416 |
| The Object Modeling Technique | p. 417 |
| The Objectory Method | p. 419 |
| The Fusion Method | p. 420 |
| The Unified Modeling Language | p. 421 |
| Summary | p. 421 |
| The Unified Modeling Language | p. 423 |
| Introduction | p. 423 |
| The Meta-Model | p. 424 |
| The Models | p. 424 |
| Use Case Diagrams | p. 425 |
| The Object Model | p. 426 |
| Packages | p. 432 |
| Sequence Diagrams | p. 434 |
| Collaboration Diagrams | p. 435 |
| State Machine Diagrams | p. 437 |
| Deployment Diagrams | p. 440 |
| Summary | p. 440 |
| The Unified Process | p. 443 |
| Introduction | p. 443 |
| The Unified Process | p. 443 |
| Requirements Workflow | p. 448 |
| Analysis Workflow | p. 449 |
| Design Workflow | p. 454 |
| Implementation Workflow | p. 458 |
| Testing Workflow | p. 458 |
| Summary | p. 458 |
| The Future | |
| Areas of Java and Object Technology not Covered | p. 461 |
| Introduction | p. 461 |
| Language Areas | p. 461 |
| Java Virtual Machine | p. 462 |
| JavaBeans | p. 462 |
| Enterprise JavaBeans | p. 463 |
| Remote Method Invocation | p. 464 |
| Java and C++ | p. 465 |
| CORBA | p. 466 |
| Java Naming and Directory Interface | p. 467 |
| Java and XML | p. 468 |
| Java 2D and Java 3D | p. 468 |
| Object-Oriented Databases | p. 469 |
| Appendices | |
| The Java API Packages | p. 471 |
| Java Keywords | p. 472 |
| References | p. 473 |
| Index | p. 477 |
| Table of Contents provided by Syndetics. All Rights Reserved. |
ISBN: 9781852335694
ISBN-10: 1852335696
Published: 15th March 2002
Format: Paperback
Language: English
Number of Pages: 516
Audience: Professional and Scholarly
Publisher: Springer Nature B.V.
Country of Publication: GB
Edition Number: 2
Edition Type: Revised
Dimensions (cm): 25.4 x 17.78 x 3.18
Weight (kg): 0.87
Shipping
| Standard Shipping | Express Shipping | |
|---|---|---|
| Metro postcodes: | $9.99 | $14.95 |
| Regional postcodes: | $9.99 | $14.95 |
| Rural postcodes: | $9.99 | $14.95 |
Orders over $79.00 qualify for free shipping.
How to return your order
At Booktopia, we offer hassle-free returns in accordance with our returns policy. If you wish to return an item, please get in touch with Booktopia Customer Care.
Additional postage charges may be applicable.
Defective items
If there is a problem with any of the items received for your order then the Booktopia Customer Care team is ready to assist you.
For more info please visit our Help Centre.
You Can Find This Book In

Architecture Patterns with Python
Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices
Paperback
RRP $125.75
$60.99
OFF























