Example: dental hygienist

The Object-Oriented Thought Process

The Object-Oriented Thought ProcessFourth s LibraryDeveloper s Library books are designed to provide practicing programmers with unique, high-quality references and tutorials on the programming languages and technologies they use in their daily work. All books in the Developer s Library are written by expert technology practitioners who are especially skilled at organizing and presenting information in a way that s useful for other titles include some of the best, most widely acclaimed books within their topic areas:PHP & MySQL Web DevelopmentLuke Welling & Laura ThomsonISBN 978-0-672-32916-6 MySQLPaul DuBoisISBN-13: 978-0-672-32938-8 Linux Kernel DevelopmentRobert LoveISBN-13: 978-0-672-32946-3 Python Essential ReferenceDavid BeazleyISBN-13: 978-0-672-32978-4 Programming in Objective-CStephen KochanISBN-13: 978-0-672-32756-8C++ Primer PlusStephen PrataISBN-13.

The Object-Oriented Thought Process Fourth Edition Matt Weisfeld Upper Saddle River, NJ • Boston • Indianapolis • San Francisco New York • Toronto • Montreal • London • Munich • Paris • Madrid

Tags:

  Process, Thought, Object, Oriented, The object oriented thought process

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of The Object-Oriented Thought Process

1 The Object-Oriented Thought ProcessFourth s LibraryDeveloper s Library books are designed to provide practicing programmers with unique, high-quality references and tutorials on the programming languages and technologies they use in their daily work. All books in the Developer s Library are written by expert technology practitioners who are especially skilled at organizing and presenting information in a way that s useful for other titles include some of the best, most widely acclaimed books within their topic areas:PHP & MySQL Web DevelopmentLuke Welling & Laura ThomsonISBN 978-0-672-32916-6 MySQLPaul DuBoisISBN-13: 978-0-672-32938-8 Linux Kernel DevelopmentRobert LoveISBN-13: 978-0-672-32946-3 Python Essential ReferenceDavid BeazleyISBN-13: 978-0-672-32978-4 Programming in Objective-CStephen KochanISBN-13: 978-0-672-32756-8C++ Primer PlusStephen PrataISBN-13.

2 978-0321-77640-2 Developer s Library books are available at most retail and online bookstores, as well as by subscription from Safari Books Online at REFERENCES FOR PROGRAMMING PROFESSIONALSD eveloper s LibraryThe Object-Oriented Thought ProcessFourth EditionMatt WeisfeldUpper Saddle River, NJ Boston Indianapolis San FranciscoNew York Toronto Montreal London Munich Paris MadridCape Town Sydney Tokyo Singapore Mexico CityThe Object-Oriented Thought Process , Fourth EditionCopyright 2013 by Pearson Education, rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from the publisher.

3 No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Nor is any liability assumed for damages resulting from the use of the informa-tion contained : 978-0-321-86127-6 ISBN-10: 0-321-86127-2 Library of Congress Cataloging-in-Publication data is on Printing March 2013 TrademarksAll terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Pearson cannot attest to the accuracy of this information.

4 Use of a term in this book should not be regarded as affecting the validity of any trademark or service and DisclaimerEvery effort has been made to make this book as complete and as accurate as possible, but no warranty or fitness is implied. The information provided is on an as is basis. The author and the publisher shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this SalesPearson offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales. For more information, please Corporate and Government sales outside of the.

5 Please contactInternational EditorMark TaberDevelopment EditorSonglin QiuManaging EditorSandra SchroederProject EditorSeth KerneyCopy EditorBarbara HachaIndexerBrad HerrimanProofreaderSarah KearnsTechnical ReviewerJon UpchurchEditorial AssistantVanessa EvansInterior DesignerGary AdairCover DesignerChuti PrasertsithCompositorBronkella Publishing LLCC ontents at a Glance Introduction 1 1 Introduction to Object-Oriented Concepts 5 2 How to Think in Terms of Objects 37 3 Advanced Object-Oriented Concepts 53 4 The Anatomy of a Class 75 5 Class Design Guidelines 87 6 Designing with Objects 105 7 Mastering Inheritance and Composition 119 8 Frameworks and Reuse: Designing with Interfaces and Abstract Classes 141 9 Building Objects and Object-Oriented Design 167 10 Creating object Models 183 11 Objects and Portable Data: XML and JSON 197 12 Persistent Objects.

6 Serialization, Marshaling, and Relational Databases 219 13 Objects in Web Services, Mobile Apps, and Hybrids 237 14 Objects and Client/Server Applications 263 15 Design Patterns 277 Index 297 Table of Contents Introduction 1 This Book s Scope 1 What s New in the Fourth Edition 2 The Intended Audience 3 The Book s Approach 3 This Book s Conventions 4 Source Code Used in This Book 4 1 Introduction to Object-Oriented Concepts 5 The Fundamental Concepts 5 Objects and Legacy Systems 6 Procedural Versus OO Programming 7 Moving from Procedural to Object-Oriented Development 11 Procedural Programming 11OO Programming 12 What Exactly Is an object ?

7 12 object Data 12 object Behaviors 13 What Exactly Is a Class? 17 Creating Objects 18 Attributes 19 Methods 20 Messages 20 Using Class Diagrams as a Visual Tool 20 Encapsulation and Data Hiding 21 Interfaces 21 Implementations 22A Real-World Example of the Interface/Implementation Paradigm 23A Model of the Interface/Implementation Paradigm 23 Inheritance 25 Superclasses and Subclasses 26 Abstraction 26Is-a Relationships 27viiContentsPolymorphism 28 Composition 31 Abstraction 32 Has-a Relationships 32 Conclusion 32 Example Code Used in This Chapter 33 The TestPerson Example: C# .NET 33 The TestShape Example: C#.

8 NET 34 2 How to Think in Terms of Objects 37 Knowing the Difference Between the Interface and the Implementation 38 The Interface 40 The Implementation 40An Interface/Implementation Example 41 Using Abstract Thinking When Designing Interfaces 45 Providing the Absolute Minimal User Interface Possible 47 Determining the Users 48 object Behavior 49 Environmental Constraints 49 Identifying the Public Interfaces 49 Identifying the Implementation 50 Conclusion 51 References 51 3 Advanced Object-Oriented Concepts 53 Constructors 53 When Is a Constructor Called? 54 What s Inside a Constructor? 54 The Default Constructor 55 Using Multiple Constructors 55 The Design of Constructors 60 Error Handling 60 Ignoring the Problem 60 Checking for Problems and Aborting the Application 61 Checking for Problems and Attempting to Recover 61 Throwing an Exception 61viiiContentsThe Importance of Scope 64 Local Attributes 64 object Attributes 65 Class Attributes 67 Operator Overloading 69 Multiple Inheritance 70 object Operations 70 Conclusion 72 References 72 Example Code Used in This Chapter 72 The TestNumber Example: C#.

9 NET 72 4 The Anatomy of a Class 75 The Name of the Class 75 Comments 77 Attributes 77 Constructors 79 Accessors 81 Public Interface Methods 83 Private Implementation Methods 84 Conclusion 84 References 85 Example Code Used in This Chapter 85 The TestCab Example: C# .NET 85 5 Class Design Guidelines 87 Modeling Real-World Systems 87 Identifying the Public Interfaces 88 The Minimum Public Interface 88 Hiding the Implementation 89 Designing Robust Constructors (and Perhaps Destructors) 90 Designing Error Handling into a Class 91 Documenting a Class and Using Comments 91 Building Objects with the Intent to Cooperate 92 Designing with Reuse in Mind 92ixContentsDesigning with Extensibility in Mind 93 Making Names Descriptive 93 Abstracting Out Nonportable Code 94 Providing a Way to Copy and Compare Objects 94 Keeping the Scope as Small as Possible 94A Class Should Be Responsible for Itself 96 Designing with Maintainability in Mind 97 Using Iteration in the Development Process 98 Testing the Interface 98 Using object Persistence 100 Serializing and Marshaling Objects 101

10 Conclusion 102 References 102 Example Code Used in This Chapter 102 The TestMath Example: C# .NET 102 6 Designing with Objects 105 Design Guidelines 105 Performing the Proper Analysis 109 Developing a Statement of Work 109 Gathering the Requirements 109 Developing a Prototype of the User Interface 110 Identifying the Classes 110 Determining the Responsibilities of Each Class 110 Determining How the Classes Collaborate with Each Other 110 Creating a Class Model to Describe the System 111 Prototyping the User Interface 111 object Wrappers 111 Structured Code 112 Wrapping Structured Code 113 Wrapping Nonportable Code 115 Wrapping Existing Classes 116 Conclusion 117 References


Related search queries