Contents
Preface V
Foreword To The Second Edition Xiii
About The Accompanying Cd-Rom Xiv
On The Bibliography, Internet Sources And Exercises Xv
Contents Xvii
Part A: The Issues 1
Chapter 1: Software Quality 3
1.1 External And Internal Factors 3
1.2 A Review Of External Factors 4
1.3 About Software Maintenance 17
1.4 Key Concepts Introduced In This Chapter 19
1.5 Bibliographical Notes 19
Chapter 2: Criteria Of Object Orientation 21
2.1 On The Criteria 21
2.2 Method And Language 22
2.3 Implementation And Environment 31
2.4 Libraries 33
2.5 For More Sneak Preview 34
2.6 Bibliographical Notes And Object Resources 34
Part B: The Road To Object Orientation 37
Chapter 3: Modularity 39
3.1 Five Criteria 40
3.2 Five Rules 46
3.3 Five Principles 53
3.4 Key Concepts Introduced In This Chapter 64
3.5 Bibliographical Notes 64
Exercises 65
Chapter 4: Approaches To Reusability 67
4.1 The Goals Of Reusability 68
4.2 What Should We Reuse? 70
4.3 Repetition In Software Development 74
4.4 Non-Technical Obstacles 74
4.5 The Technical Problem 81
4.6 Five Requirements On Module Structures 83
4.7 Traditional Modular Structures 89
4.8 Overloading And Genericity 93
4.9 Key Concepts Introduced In This Chapter 98
4.10 Bibliographical Notes 99
Chapter 5: Towards Object Technology 101
5.1 The Ingredients Of Computation 101
5.2 Functional Decomposition 103
5.3 Object-Based Decomposition 114
5.4 Object-Oriented Software Construction 116
5.5 Issues 117
5.6 Key Concepts Introduced In This Chapter 119
5.7 Bibliographical Notes 119
Chapter 6: Abstract Data Types 121
6.1 Criteria 122
6.2 Implementation Variations 122
6.3 Towards An Abstract View Of Objects 126
6.4 Formalizing The Specification 129
6.5 From Abstract Data Types To Classes 142
6.6 Beyond Software 147
6.7 Supplementary Topics 148
6.8 Key Concepts Introduced In This Chapter 159
6.9 Bibliographical Notes 160
Exercises 161
Part C: Object-Oriented Techniques 163
Chapter 7: The Static Structure: Classes 165
7.1 Objects Are Not The Subject 165
7.2 Avoiding The Standard Confusion 166
7.3 The Role Of Classes 169
7.4 A Uniform Type System 171
7.5 A Simple Class 172
7.6 Basic Conventions 177
7.7 The Object-Oriented Style Of Computation 181
7.8 Selective Exports And Information Hiding 191
7.9 Putting Everything Together 194
7.10 Discussion 203
7.11 Key Concepts Introduced In This Chapter 213
7.12 Bibliographical Notes 215
Exercises 216
Chapter 8: The Run-Time Structure: Objects 217
8.1 Objects 218
8.2 Objects As A Modeling Tool 228
8.3 Manipulating Objects And References 231
8.4 Creation Procedures 236
8.5 More On References 240
8.6 Operations On References 242
8.7 Composite Objects And Expanded Types 254
8.8 Attachment: Reference And Value Semantics 261
8.9 Dealing With References: Benefits And Dangers 265
8.10 Discussion 270
8.11 Key Concepts Introduced In This Chapter 276
8.12 Bibliographical Notes 277
Exercises 277
Chapter 9: Memory Management 279
9.1 What Happens To Objects 279
9.2 The Casual Approach 291
9.3 Reclaiming Memory: The Issues 293
9.4 Programmer-Controlled Deallocation 294
9.5 The Component-Level Approach 297
9.6 Automatic Memory Management 301
9.7 Reference Counting 302
9.8 Garbage Collection 304
9.9 Practical Issues Of Garbage Collection 309
9.10 An Environment With Memory Management 312
9.11 Key Concepts Introduced In This Chapter 315
9.12 Bibliographical Notes 315
Exercises 316
Chapter 10: Genericity 317
10.1 Horizontal And Vertical Type Generalization 317
10.2 The Need For Type Parameterization 318
10.3 Generic Classes 320
10.4 Arrays 325
10.5 The Cost Of Genericity 328
10.6 Discussion: Not Done Yet 329
10.7 Key Concepts Introduced In This Chapter 329
10.8 Bibliographical Notes 330
Exercises 330
Chapter 11: Design By Contract: Building Reliable Software 331
11.1 Basic Reliability Mechanisms 332
11.2 About Software Correctness 333
11.3 Expressing A Specification 334
11.4 Introducing Assertions Into Software Texts 337
11.5 Preconditions And Postconditions 338
11.6 Contracting For Software Reliability 341
11.7 Working With Assertions 348
11.8 Class Invariants 363
11.9 When Is A Class Correct? 369
11.10 The Adt Connection 373
11.11 An Assertion Instruction 378
11.12 Loop Invariants And Variants 380
11.13 Using Assertions 389
11.14 Discussion 398
11.15 Key Concepts Introduced In This Chapter 406
11.16 Bibliographical Notes 407
Exercises 408
Postscript: The Ariane 5 Failure 410
Chapter 12: When The Contract Is Broken: Exception Handling 411
12.1 Basic Concepts Of Exception Handling 411
12.2 Handling Exceptions 414
12.3 An Exception Mechanism 419
12.4 Exception Handling Examples 422
12.5 The Task Of A Rescue Clause 427
12.6 Advanced Exception Handling 431
12.7 Discussion 435
12.8 Key Concepts Introduced In This Chapter 437
12.9 Bibliographical Notes 438
Exercises 438
Chapter 13: Supporting Mechanisms 439
13.1 Interfacing With Non-O-O Software 439
13.2 Argument Passing 444
13.3 Instructions 447
13.4 Expressions 452
13.5 Strings 456
13.6 Input And Output 457
13.7 Lexical Conventions 457
13.8 Key Concepts Introduced In This Chapter 458
Exercises 458
Chapter 14: Introduction To Inheritance 459
14.1 Polygons And Rectangles 460
14.2 Polymorphism 467
14.3 Typing For Inheritance 472
14.4 Dynamic Binding 480
14.5 Deferred Features And Classes 482
14.6 Redeclaration Techniques 491
14.7 The Meaning Of Inheritance 494
14.8 The Role Of Deferred Classes 500
14.9 Discussion 507
14.10 Key Concepts Introduced In This Chapter 516
14.11 Bibliographical Notes 517
Exercises 517
Chapter 15: Multiple Inheritance 519
15.1 Examples Of Multiple Inheritance 519
15.2 Feature Renaming 535
15.3 Flattening The Structure 541
15.4 Repeated Inheritance 543
15.5 Discussion 563
15.6 Key Concepts Introduced In This Chapter 566
15.7 Bibliographical Notes 567
Exercises 567
Chapter 16: Inheritance Techniques 569
16.1 Inheritance And Assertions 569
16.2 The Global Inheritance Structure 580
16.3 Frozen Features 583
16.4 Constrained Genericity 585
16.5 Assignment Attempt 591
16.6 Typing And Redeclaration 595
16.7 Anchored Declaration 598
16.8 Inheritance And Information Hiding 605
16.9 Key Concepts Introduced In This Chapter 609
16.10 Bibliographical Note 610
Exercises 610
Chapter 17: Typing 611
17.1 The Typing Problem 611
17.2 Static Typing: Why And How 615
17.3 Covariance And Descendant Hiding 621
17.4 First Approaches To System Validity 628
17.5 Relying On Anchored Types 630
17.6 Global Analysis 633
17.7 Beware Of Polymorphic Catcalls! 636
17.8 An Assessment 639
17.9 The Perfect Fit 640
17.10 Key Concepts Studied In This Chapter 641
17.11 Bibliographical Notes 641
Chapter 18: Global Objects And Constants 643
18.1 Constants Of Basic Types 643
18.2 Use Of Constants 645
18.3 Constants Of Class Types 646
18.4 Applications Of Once Routines 648
18.5 Constants Of String Type 653
18.6 Unique Values 654
18.7 Discussion 656
18.8 Key Concepts Introduced In This Chapter 659
18.9 Bibliographical Notes 660
Exercises 660
Part D: Object-Oriented Methodology:
Applying The Method Well 661
Chapter 19: On Methodology 663
19.1 Software Methodology: Why And What 663
19.2 Devising Good Rules: Advice To The Advisors 664
19.3 On Using Metaphors 671
19.4 The Importance Of Being Humble 673
19.5 Bibliographical Notes 674
Exercises 674
Chapter 20: Design Pattern: Multi-Panel Interactive Systems 675
20.1 Multi-Panel Systems 675
20.2 A Simple-Minded Attempt 677
20.3 A Functional, Top-Down Solution 678
20.4 A Critique Of The Solution 682
20.5 An Object-Oriented Architecture 684
20.6 Discussion 693
20.7 Bibliographical Note 694
Chapter 21: Inheritance Case Study: “undo” In An Interactive
System 695
21.1 Perseverare Diabolicum 695
21.2 Finding The Abstractions 699
21.3 Multi-Level Undo-Redo 704
21.4 Implementation Aspects 707
21.5 A User Interface For Undoing And Redoing 711
21.6 Discussion 712
21.7 Bibliographical Notes 715
Exercises 715
Chapter 22: How To Find The Classes 719
22.1 Studying A Requirements Document 720
22.2 Danger Signals 726
22.3 General Heuristics For Finding Classes 731
22.4 Other Sources Of Classes 735
22.5 Reuse 740
22.6 The Method For Obtaining Classes 741
22.7 Key Concepts Introduced In This Chapter 743
22.8 Bibliographical Notes 744
Chapter 23: Principles Of Class Design 747
23.1 Side Effects In Functions 748
23.2 How Many Arguments For A Feature? 764
23.3 Class Size: The Shopping List Approach 770
23.4 Active Data Structures 774
23.5 Selective Exports 796
23.6 Dealing With Abnormal Cases 797
23.7 Class Evolution: The Obsolete Clause 802
23.8 Documenting A Class And A System 803
23.9 Key Concepts Introduced In This Chapter 806
23.10 Bibliographical Notes 806
Exercises 807
Chapter 24: Using Inheritance Well 809
24.1 How Not To Use Inheritance 809
24.2 Would You Rather Buy Or Inherit? 812
24.3 An Application: The Handle Technique 817
24.4 Taxomania 820
24.5 Using Inheritance: A Taxonomy Of Taxonomy 822
24.6 One Mechanism, Or More? 833
24.7 Subtype Inheritance And Descendant Hiding 835
24.8 Implementation Inheritance 844
24.9 Facility Inheritance 847
24.10 Multiple Criteria And View Inheritance 851
24.11 How To Develop Inheritance Structures 858
24.12 A Summary View: Using Inheritance Well 862
24.13 Key Concepts Introduced In This Chapter 863
24.14 Bibliographical Notes 863
24.15 Appendix: A History Of Taxonomy 864
Exercises 869
Chapter 25: Useful Techniques 871
25.1 Design Philosophy 871
25.2 Classes 872
25.3 Inheritance Techniques 873
Chapter 26: A Sense Of Style 875
26.1 Cosmetics Matters! 875
26.2 Choosing The Right Names 879
26.3 Using Constants 884
26.4 Header Comments And Indexing Clauses 886
26.5 Text Layout And Presentation 891
26.6 Fonts 900
26.7 Bibliographical Notes 901
Exercises 902
Chapter 27: Object-Oriented Analysis 903
27.1 The Goals Of Analysis 903
27.2 The Changing Nature Of Analysis 906
27.3 The Contribution Of Object Technology 907
27.4 Programming A Tv Station 907
27.5 Expressing The Analysis: Multiple Views 914
27.6 Analysis Methods 917
27.7 The Business Object Notation 919
27.8 Bibliography 922
Chapter 28: The Software Construction Process 923
28.1 Clusters 923
28.2 Concurrent Engineering 924
28.3 Steps And Tasks 926
28.4 The Cluster Model Of The Software Lifecycle 926
28.5 Generalization 928
28.6 Seamlessness And Reversibility 930
28.7 With Us, Everything Is The Face 933
28.8 Key Concepts Covered In This Chapter 934
28.9 Bibliographical Notes 934
Chapter 29: Teaching The Method 935
29.1 Industrial Training 935
29.2 Introductory Courses 937
29.3 Other Courses 941
29.4 Towards A New Software Pedagogy 942
29.5 An Object-Oriented Plan 946
29.6 Key Concepts Studied In This Chapter 948
29.7 Bibliographical Notes 948
Part E: Advanced Topics 949
Chapter 30: Concurrency, Distribution, Client-Server And
The Internet 951
30.1 A Sneak Preview 951
30.2 The Rise Of Concurrency 953
30.3 From Processes To Objects 956
30.4 Introducing Concurrent Execution 964
30.5 Synchronization Issues 977
30.6 Accessing Separate Objects 982
30.7 Wait Conditions 990
30.8 Requesting Special Service 998
30.9 Examples 1003
30.10 Towards A Proof Rule 1022
30.11 A Summary Of The Mechanism 1025
30.12 Discussion 1028
30.13 Key Concepts Introduced In This Chapter 1032
30.14 Bibliographical Notes 1033
Exercises 1035
Chapter 31: Object Persistence And Databases 1037
31.1 Persistence From The Language 1037
31.2 Beyond Persistence Closure 1039
31.3 Schema Evolution 1041
31.4 From Persistence To Databases 1047
31.5 Object-Relational Interoperability 1048
31.6 Object-Oriented Database Fundamentals 1050
31.7 O-O Database Systems: Examples 1055
31.8 Discussion: Beyond O-O Databases 1058
31.9 Key Concepts Studied In This Chapter 1060
31.10 Bibliographical Notes 1061
Exercises 1062
Chapter 32: Some O-O Techniques For Graphical Interactive
Applications 1063
32.1 Needed Tools 1064
32.2 Portability And Platform Adaptation 1066
32.3 Graphical Abstractions 1068
32.4 Interaction Mechanisms 1071
32.5 Handling The Events 1072
32.6 A Mathematical Model 1076
32.7 Bibliographical Notes 1076
Part F: Applying The Method In Various
Languages And Environments 1077
Chapter 33: O-O Programming And Ada 1079
33.1 A Bit Of Context 1079
33.2 Packages 1081
33.3 A Stack Implementation 1081
33.4 Hiding The Representation: The Private Story 1085
33.5 Exceptions 1088
33.6 Tasks 1091
33.7 From Ada To Ada 95 1092
33.8 Key Concepts Introduced In This Chapter 1097
33.9 Bibliographical Notes 1097
Exercises 1098
Chapter 34: Emulating Object Technology In Non-O-O
Environments 1099
34.1 Levels Of Language Support 1099
34.2 Object-Oriented Programming In Pascal? 1100
34.3 Fortran 1102
34.4 Object-Oriented Programming And C 1106
34.5 Bibliographical Notes 1112
Exercises 1112
Chapter 35: Simula To Java And Beyond: Major O-O Languages
And Environments 1113
35.1 Simula 1113
35.2 Smalltalk 1126
35.3 Lisp Extensions 1130
35.4 C Extensions 1131
35.5 Java 1136
35.6 Other O-O Languages 1137
35.7 Bibliographical Notes 1138
Exercises 1139
Part G: Doing It Right 1141
Chapter 36: An Object-Oriented Environment 1143
36.1 Components 1143
36.2 The Language 1144
36.3 The Compilation Technology 1144
36.4 Tools 1148
36.5 Libraries 1150
36.6 Interface Mechanisms 1152
36.7 Bibliographical Notes 1160
Epilogue, In Full Frankness Exposing The Language 1161
Part H: Appendices 1163
Appendix A: Extracts From The Base Libraries 1165
Appendix B: Genericity Versus Inheritance 1167
B.1 Genericity 1168
B.2 Inheritance 1173
B.3 Emulating Inheritance With Genericity 1175
B.4 Emulating Genericity With Inheritance 1176
B.5 Combining Genericity And Inheritance 1184
B.6 Key Concepts Introduced In This Appendix 1187
B.7 Bibliographical Notes 1188
Exercises 1188
Appendix C: Principles, Rules, Precepts And Definitions 1189
Appendix D: A Glossary Of Object Technology 1193
Appendix E: Bibliography 1203
E.1 Works By Other Authors 1203
E.2 Works By The Author Of The Present Book 1221
Index 1225
《HTML+CSS网页设计与布局从入门到精通》紧密围绕网页设计师在制作网页过程中的实际需要和应该掌握的技术,全面介绍了使用HTML和
IsyourapplicationorWebsitereadyforprimetime?Amajorrevisionofaclassicreference,"G...
《逢考必过》内容简介:世界记忆大师的经典记忆著作,应战各种考试的制胜法宝,颠覆你既定记忆程序的学力提升指南! 8次世界脑力锦
《设计中的人因:34个设计小故事》内容简介:本书收录了34个人因科学小故事,旨在通过简单化、生活化的解读,带领大家走进设计中的
《零基础学单片机C语言程序设计》内容简介:《零基础学单片机C语言程序设计》由浅入深,循序渐进地讲解了C51语言的方方面面。奉书知
五所权威德国设计学院:柏林艺术大学(UdkBerlin)杜塞尔多夫高等专业学院(FHD)莱比锡书籍设计及平面设计学院(HGBLeipzig)奥
在《氢经济》一书中,畅销书作家杰瑞米・里夫金从一个独特的角度向我们展示了即将来临的商业时代。作为一个新的经济动力――将从
让你的PPT会说话 本书特色 适读人群 :1.已初步掌握PPT基本操作,急待提升的职场白领 2.要用PPT打动别人的培训师和学校老师 3.即将走上社会需要快速掌...
《三维CAD/CAM》内容简介:结合机械类专业的实际,以够用为度,主要讲述设计模块和加工模块。第一部分为设计模块(即CAD模块),主
《如何打造活力组织》内容简介:活力组织是指能够超越经济周期和组织兴衰规律的约束,通过建立共同的发展价值观,建立系统的活力运
本书涵盖了现代微处理器编译器的设计和实现方面的所有高级主题。本书首先介绍编译器的结构、符号表管理、中间代码结构、运行时支
在成千上万的移动应用中,如何使你的应用脱颖而出,立即吸引住用户,本书提供了非常实用的技巧,可以帮助你设计优秀的移动应用界
《装帧之美》由日本设计大师铃木成一亲自挑选在他长达近三十年的设计生涯、八千件的作品中,最具代表性的一百二十件作品,并且详
版式设计原理,ISBN:9787500677390,作者:(日)佐佐木刚士目录 第1章页面构成的理论总觉得效果有点奇怪根据理论修改之后Spec
《完美主义扼杀效率》内容简介:工作的目标是成果,而不是完美! 33个完美主义思维误区! 日本上班族人手一本!做出成果只需抓住20
《艺术沉思录》内容简介:本书图文并茂,凝聚了崔自默先生从事艺术创作近40年来的艺术教学、实践、研究、发明的经验总结与精髓指导
《当代中国高等教育》内容简介:教育规划纲要颁布实施以来,高等教育改革的进程如火如荼。那么在改革的过程中我们遇到了哪些矛盾和
ArcGIS基础实例教程 本书特色 《ArcGIS基础实例教程》介绍了ArcGIS的重要产品ArcGIS for Desktop的基本功能,具体包括数据显示与管...
《XMPP高级编程:使用JavaScript和jQuery》内容简介:XMPP是一个广泛用于即时通信、多用户聊天、语言和视频会议、协作空间、实时游
《图解新款汽车传感器结构、原理与检修》内容简介:本书在系统介绍传感器结构与测量原理的基础上,系统总结了汽车传感器的结构类型