Software Development with C++ -  Kjell Nielsen

Software Development with C++ (eBook)

Maximizing Reuse with Object Technology
eBook Download: PDF | EPUB
2014 | 1. Auflage
474 Seiten
Elsevier Science (Verlag)
978-1-4832-6569-8 (ISBN)
Systemvoraussetzungen
Systemvoraussetzungen
54,95 inkl. MwSt
  • Download sofort lieferbar
  • Zahlungsarten anzeigen
Software Development with C++: Maximizing Reuse with Object Technology is about software development and object-oriented technology (OT), with applications implemented in C++. The basis for any software development project of complex systems is the process, rather than an individual method, which simply supports the overall process. This book is not intended as a general, all-encompassing treatise on OT. The intent is to provide practical information that is directly applicable to a development project. Explicit guidelines are offered for the infusion of OT into the various development phases. The book is divided into five major parts. Part I describes why we need a development process, the phases and steps of the software process, and how we use individual methods to support this process. Part II lays the foundation for the concepts included in OT. Part III describes how OT is used in the various phases of the software development process, including the domain analysis, system requirements analysis, system design, software requirements analysis, software design, and implementation. Part IV deals exclusively with design issues for an anticipated C++ implementation. Part V is devoted to object-oriented programming with C++. This book is intended for practicing software developers, software managers, and computer science and software engineering students. Sufficient guidelines are included to aid project leaders in establishing an overall development process for small, medium, and large system applications.
Software Development with C++: Maximizing Reuse with Object Technology is about software development and object-oriented technology (OT), with applications implemented in C++. The basis for any software development project of complex systems is the process, rather than an individual method, which simply supports the overall process. This book is not intended as a general, all-encompassing treatise on OT. The intent is to provide practical information that is directly applicable to a development project. Explicit guidelines are offered for the infusion of OT into the various development phases. The book is divided into five major parts. Part I describes why we need a development process, the phases and steps of the software process, and how we use individual methods to support this process. Part II lays the foundation for the concepts included in OT. Part III describes how OT is used in the various phases of the software development process, including the domain analysis, system requirements analysis, system design, software requirements analysis, software design, and implementation. Part IV deals exclusively with design issues for an anticipated C++ implementation. Part V is devoted to object-oriented programming with C++. This book is intended for practicing software developers, software managers, and computer science and software engineering students. Sufficient guidelines are included to aid project leaders in establishing an overall development process for small, medium, and large system applications.

Front Cover 1
Software Development with C++: Maximizing Reuse with Object Technology 4
Copyright Page 5
Table of Contents 8
Dedication 6
Preface 22
Part I: The Software Development Process 25
Chapter 1. Introduction 27
1.1 Why Do We Need a Development Process? 27
1.2 Why Switch to Object-Oriented Techniques? 30
1.3 Current Practices 31
Chapter 2. Steps in the Development Process 36
2.1 Overview of the Development Process 37
2.2 Domain Analysis 39
2.3 System Requirements Analysis 39
2.4 System Design 40
2.5 Software Requirements Analysis 41
2.6 Software Design 41
2.7 Implementation 45
2.8 Summary 45
Chapter 3. Development Process versus Methods 48
3.1 Methods That Support the Development Steps 48
3.2 Traditional Methods versus Object-Oriented Methods 53
3.3 Notation 58
3.4 Language Dependence 59
3.5 Summary 59
Part II: Object Technology 62
Chapter 4. Object-Oriented Paradigms 64
4.1 Classes and Objects 65
4.2 Encapsulation and Information Hiding 66
4.3 Data Abstraction 68
4.4 Responsibilities 70
4.5 Collaborations and Message Passing 70
4.6 Inheritance 71
4.7 Polymorphism 73
4.8 Binding 75
4.9 Modularity 76
4.10 Genericity 77
Chapter 5. Classes and Objects 80
5.1 Definitions 80
5.2 Creating Classes 85
5.3 Inheritance and Class Hierarchies 88
5.4 Aggregation 89
5.5 Association 92
5.6 Using 94
5.7 Mixin Classes 95
5.8 Container Classes 95
5.9 Metaclasses 95
5.10 Reusability Issues 96
Chapter 6. Object-Oriented Analysis and Design Models 98
6.1 Object-Oriented Models 99
6.2 Static Models 100
6.3 Dynamic Models 103
6.4 System Design Models 107
6.5 Concurrency Models 108
6.6 Functional Models 110
6.7 Summary 110
Chapter 7. Object-Oriented Methods 112
7.1 Object Modeling Technique (OMT) 112
7.2 Object-Oriented Software Engineering (OOSE) 118
7.3 Booch'93 129
7.4 Shlaer-Mellor 135
7.5 RDD and CRCs 144
7.6 Coad-Yourdon 147
7.7 Other Methods 154
7.8 Summary 154
Chapter 8. Using Object-Oriented Methods 156
8.1 Benefits of Object-Oriented Methods 157
8.2 Potential Problems with Object-Oriented Methods 157
8.3 When to Use Object-Oriented Methods 160
8.4 Mixing Object-Oriented and Structured Methods 161
8.5 Selecting the "Right" Method 162
8.6 Recommended Modeling Approach 166
8.7 Identifying Real-World Classes and Objects 181
8.8 Transitioning from Structured to OT Methods 183
8.9 Effect on Steps in the Development Process 184
8.10 Summary 186
Part III: Using OT in the Software Development Process 188
Chapter 9. Domain Analysis 190
9.1 Understanding the Problem Domain 192
9.2 Capturing Existing Expertise and Software 193
9.3 Creating Real-World Classes and Objects 195
9.4 Evaluation of Objects 198
9.5 Work Products 199
9.6 Risk Areas 201
Chapter 10. System Requirements Analysis 204
10.1 Using Scenarios 205
10.2 Object-Oriented Analysis 215
10.3 The Analysis Model 218
10.4 Heuristics for Creating Analysis Objects 224
10.5 Refinements of Builds and Prototypes 227
10.6 Risk Areas 229
10.7 Work Products 232
Chapter 11. System Design 234
11.1 Partitioning 235
11.2 Configuring 246
11.3 Summary 256
Chapter 12. Software Requirements Analysis 258
12.1 Models 259
12.2 Object-Oriented Analysis 264
12.3 Creating Scenarios 264
12.4 Identifying Classes and Objects 265
12.5 Identifying Attributes and Operations 267
12.6 Preparing Object Views 268
12.7 Data Modeling 269
12.8 Class/Object Evaluation 270
12.9 Work Products 270
12.10 Summary 273
Chapter 13. Software Design 274
13.1 Transitioning from the Analysis Phase 275
13.2 Process Structuring 276
13.3 Object-Oriented Design 287
13.4 OOD Products 287
13.5 Exception Handling 289
13.6 Design Evaluation 291
13.7 Summary 296
Chapter 14. Implementation 298
14.1 Transitioning from Design 298
14.2 Programming 299
14.3 Exception Handling 300
14.4 Testing 300
14.5 Debugging 301
14.6 Summary 302
Part IV: Object-Oriented Design for C++ 304
Chapter 15. Why Use C++? 306
15.1 Object-Oriented Languages 306
15.2 Benefits of C++ 309
15.3 Potential Problems with C++ 310
15.4 Summary 311
Chapter 16. Transitioning from Analysis to Design 312
16.1 Design Goals 312
16.2 OOA Products 313
16.3 OOD Modeling Views 314
16.4 Transitioning Rules 314
16.5 Reusability Issues 316
Chapter 17. Designing Classes 318
17.1 Class Design 319
17.2 Class Interfaces 322
17.3 Class Architecture 324
17.4 Exception Handling 327
17.5 Class Libraries 328
17.6 Frameworks 331
17.7 Evaluation of Class Design 331
17.8 Class Management 332
17.9 Real-Time Issues 334
Chapter 18. C++ Concurrency Support 336
18.1 Programming Languages 336
18.2 C++Libraries 339
18.3 Summary 340
Part V: Object-Oriented Programming with C++ 342
Chapter 19. Implementing Object-Oriented Features in C++ 344
19.1 Transitioning from Design to Programming 344
19.2 Types and Classes in C++ 346
19.3 Using structs versus Classes 348
19.4 Inheritance 351
19.5 Aggregation 354
19.6 Using Relationship 355
19.7 Constructors 356
19.8 Destructors 368
19.9 Polymorphism 370
19.10 Exception Handling 373
19.11 Templates 374
19.12 Performance Issues 376
19.13 Reusability Issues 376
19.14 Summary 377
Chapter 20. Class Construction in C++ 380
20.1 Public 380
20.2 Private 382
20.3 Protected 382
20.4 Friend Functions 384
20.5 Friend Classes 386
20.6 Virtual Member Functions 388
20.7 Abstract Base Classes 390
20.8 Static Members 391
20.9 Program Organization 393
20.10 Summary 395
Chapter 21. Exception Handling in C++ 396
21.1 Declaring Exceptions 397
21.2 Raising Exceptions 398
21.3 Handling Exceptions 401
21.4 Propagation of Exceptions 403
21.5 Exception Categories 403
21.6 Exception Handling in C++ Libraries 406
21.7 Summary 407
Chapter 22. Developing a Windows C++ Library 408
22.1 Domain Analysis 408
22.2 System Design 410
22.3 Software Requirement Analysis (OOA) 410
22.4 Designing the Interfaces (OOD) 419
22.5 Implementing the Classes (OOP) 421
22.6 Summary 426
Appendix A: Moving from C to C++ 428
A.1 ANSI C and C++ 429
A.2 Function Prototypes 431
A.3 Function Parameters 431
A.4 Call-by-Reference Parameters 431
A.5 Variable Number of Parameters 433
A.6 Function Overloading and Type Safe Linkage 433
A.7 The consttype Modifier 434
A.8 Classes and Structs 434
A.9 I/O Libraries 435
A.10 Inline Functions 436
A.11 Functions new and delete 437
A.12 Organizational Issues 437
A.13 Strategy for Adopting C++ 438
Appendix B: C++ Coding Guidelines 440
B.1 Design of ADTs 440
B.2 Use of Classes and Structs 441
B.3 Class Interfaces 442
B.4 Virtual Functions 443
B.5 Inheritance 444
B.6 Public versus Private Derivation 444
B.7 Dynamic Allocation 444
B.8 Use of Friends 445
B.9 Inline Functions 445
B.10 Mixing C and C++ Functions 445
B.11 Parameter Passing 446
B.12 Use of Macros 447
B.13 Exception Handling 447
Appendix C: Object Technology Glossary 450
References 456
Index 464

1

Introduction


Publisher Summary


This chapter discusses the need of a development process based on the inherent complexity of even small software products. The development of software products is an inherently complex task. The complexity manifests itself in the understanding of detailed customer requirements, and specific analysis, design, and programming techniques that are necessary to produce a high quality software product. A software product is approached with completely different viewpoints by its ultimate users and the software developers. The developers look at a software product regarding design and programming techniques, and how efficient the product can be in terms of execution time and the amount of storage required. Software products can be created by programming directly from loosely formulated requirements specifications. This is referred to as hacking and rarely results in high quality software that can form the basis for a product line with reusable components. Each phase of the development process of producing software includes a number of intermediate analysis and design products that ease the communication barrier between users and developers, and among various development teams working on different portions of a large system. The intermediate products include important analysis and design documentation that is used in design reviews.

This chapter includes the rationale for why we need a development process, based on the inherent complexity of even small software products. The emphasis throughout this discussion is on the creation of high quality software, and on teams of developers working on separate phases of the development process.

The differences between structured and object-oriented approaches are described, with an emphasis on the advantages of an object-orientation. Current development practices are described with an eye toward organizations that are on the verge of, or are agonizing over whether they should be switching to object-oriented approaches.

1.1 WHY DO WE NEED A DEVELOPMENT PROCESS?


The code segment shown in Figure 1-1 is a portion of a final software product. But what does it represent, and where did it come from? The code segment is a C++ implementation of an abstraction of a “window” entity [DIL92], and can be used in various Microsoft Windows applications. It is highly unlikely that even the brightest programmer could create this code segment in isolation without the benefit of prior analysis and design. A sequence of development steps necessarily preceded the programming task for this code segment. This sequence represents a development process.


Figure 1-1 Windows abstraction

The development of software products is an inherently complex task. The complexity manifests itself in the understanding of detailed customer requirements, as well as specific analysis, design, and programming techniques that are necessary to produce a high quality software product.

A software product is approached with completely different viewpoints by its ultimate users and the software developers. The users are interested in desired features and how easy the product will be to use. The developers look at a software product with regard to design and programming techniques, and how efficient the product will be in terms of execution time and the amount of storage required.

Because of the limited capabilities of humans (even the most gifted!) to comprehend a large number of new and complex concepts, an immediate problem arises at the communication level between users and developers. Neither of these two groups fully understands the domain of the other, and some means of communication has to be created to bridge the gap of understanding.

Every software product is created to satisfy the needs of actual or perceived customers. These needs are specified in a system requirements document if a real customer is contracting to have the work done. This document represents the requirements for the new product. If a new software product line is being planned, there are a number of perceived customers who are the potential buyers of the product. In this case, the requirements may be less formally stated, but they exist nevertheless, and should be documented in a system requirements specification just as for a real customer.

Software products can be created by programming directly from loosely formulated requirements specifications. This is referred to as “hacking,” and rarely results in high quality software that can form the basis for a product line with reusable components. An extensive analysis of the system requirements and a subsequent design effort should be performed prior to the start of the actual programming effort. The analysis effort will ensure that the product we are about to create will satisfy our customers’ needs. The design effort will help in the construction of reusable software entities.

The discussion above implies that any software development effort should consist of at least three steps: analysis, design, and implementation. These three steps represent a development process. This does not imply that the steps are necessarily performed in a strict sequential order. For a large system, there are usually parallel activities happening simultaneously for several smaller portions of the system. The different development teams are dependent on the work produced by the other teams from other phases of the development.

We will note in later chapters that the three suggested steps of analysis, design, and implementation are not sufficient, and other steps that can improve the process will be added, in particular, a domain analysis step (see Chapter 2).

To summarize the discussion above, we need a development process to manage the inherent complexity of producing software. This process is repeatable (i.e., reusable!) and scales up to large projects. Some of the steps included for large systems may be omitted for small and medium systems.

Each phase of the process includes a number of intermediate analysis and design products that ease the communication barrier between users and developers, and between various development teams working on different portions of a large system. The intermediate products include important analysis and design documentation that is used in design reviews.

The steps in the process are also used in tracking the progress and achievement of intermediate goals for large projects.

1.2 WHY SWITCH TO OBJECT-ORIENTED TECHNIQUES?


It used to be that “modular” and “structured” design (we will lump this into “structured techniques” henceforth) and programming techniques were considered “good” and necessary for developing a high quality software product. Over the last few years, however, the term “object-oriented” is being associated with “good” software products, and is used profusely about anything remotely connected to software development. The structured techniques are becoming associated with old-fashioned and less quality-oriented approaches. Many software vendors are marketing their products with the object-oriented label attached, and methods and tools vendors are fiercely competing for our attention with CASE tools supporting specific object-oriented methods.

Many of the claims made for object-oriented products do not satisfy the paradigms and concepts defined in the later chapters. The old cliché of buyer beware still prevails: Even if a product sounds like “object-oriented,” it may very well not live up to these claims.

Why is it that so much attention has been focused on object-oriented techniques in the last few years? Are there definite advantages to using these new techniques over the older, well-proven structured approaches? Any time we move to new development techniques there are significant initial costs associated with training, acquisition and licensing of new development tools, and potential organizational changes. These costs must be offset by future benefits of using the new techniques and tools. We would also like to have some measure of the risks associated with the switch regarding potential higher costs and longer schedules.

Some of the benefits of using object-oriented techniques can be summarized as follows:

• High Degree of Reusability. Object-oriented entities can be structured with interfaces that permit several applications within the same domain to use the same entities, e.g., C++ class libraries.

• Better Communication with Our Customers. “Objects” can describe real-world entities that our customers can readily relate to.

• Shorter Development Time. Object-oriented approaches lend themselves to rapid prototyping with concept development that a customer can inspect and approve before the development team heads down a wrong and subsequently expensive track.

• Ease of Maintenance. With a close correspondence between user concepts and implemented software entities, requirements changes and extensions can be isolated to a few objects, resulting in reduced coding and testing efforts.

It should be understood at the outset that the...

Erscheint lt. Verlag 28.6.2014
Sprache englisch
Themenwelt Informatik Programmiersprachen / -werkzeuge NET Programmierung
Mathematik / Informatik Informatik Web / Internet
Technik Bauwesen
ISBN-10 1-4832-6569-2 / 1483265692
ISBN-13 978-1-4832-6569-8 / 9781483265698
Haben Sie eine Frage zum Produkt?
PDFPDF (Adobe DRM)
Größe: 23,4 MB

Kopierschutz: Adobe-DRM
Adobe-DRM ist ein Kopierschutz, der das eBook vor Mißbrauch schützen soll. Dabei wird das eBook bereits beim Download auf Ihre persönliche Adobe-ID autorisiert. Lesen können Sie das eBook dann nur auf den Geräten, welche ebenfalls auf Ihre Adobe-ID registriert sind.
Details zum Adobe-DRM

Dateiformat: PDF (Portable Document Format)
Mit einem festen Seiten­layout eignet sich die PDF besonders für Fach­bücher mit Spalten, Tabellen und Abbild­ungen. Eine PDF kann auf fast allen Geräten ange­zeigt werden, ist aber für kleine Displays (Smart­phone, eReader) nur einge­schränkt geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen eine Adobe-ID und die Software Adobe Digital Editions (kostenlos). Von der Benutzung der OverDrive Media Console raten wir Ihnen ab. Erfahrungsgemäß treten hier gehäuft Probleme mit dem Adobe DRM auf.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen eine Adobe-ID sowie eine kostenlose App.
Geräteliste und zusätzliche Hinweise

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

EPUBEPUB (Adobe DRM)
Größe: 14,4 MB

Kopierschutz: Adobe-DRM
Adobe-DRM ist ein Kopierschutz, der das eBook vor Mißbrauch schützen soll. Dabei wird das eBook bereits beim Download auf Ihre persönliche Adobe-ID autorisiert. Lesen können Sie das eBook dann nur auf den Geräten, welche ebenfalls auf Ihre Adobe-ID registriert sind.
Details zum Adobe-DRM

Dateiformat: EPUB (Electronic Publication)
EPUB ist ein offener Standard für eBooks und eignet sich besonders zur Darstellung von Belle­tristik und Sach­büchern. Der Fließ­text wird dynamisch an die Display- und Schrift­größe ange­passt. Auch für mobile Lese­geräte ist EPUB daher gut geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen eine Adobe-ID und die Software Adobe Digital Editions (kostenlos). Von der Benutzung der OverDrive Media Console raten wir Ihnen ab. Erfahrungsgemäß treten hier gehäuft Probleme mit dem Adobe DRM auf.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen eine Adobe-ID sowie eine kostenlose App.
Geräteliste und zusätzliche Hinweise

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

Mehr entdecken
aus dem Bereich
Expert-backed advice for information system design, down to .NET and …

von Jean-Philippe Gouigoux

eBook Download (2024)
Packt Publishing (Verlag)
38,39
Build practical projects with Blazor, .NET MAUI, gRPC, GraphQL, and …

von Mark J. Price

eBook Download (2023)
Packt Publishing (Verlag)
35,99