Multiparadigm Design in C++
This chapter discusses the integration of modern features in C++ with object‐oriented design techniques. The goal is to design robust and flexible classes in C++. The chapter first explores two modelling techniques; the Liskov substitution principle (LSP); and the single responsibility principle (SR...
Saved in:
| Published in | Financial Instrument Pricing Using C++ pp. 185 - 213 |
|---|---|
| Main Author | |
| Format | Book Chapter |
| Language | English |
| Published |
United Kingdom
John Wiley & Sons, Incorporated
2018
Wiley |
| Subjects | |
| Online Access | Get full text |
| ISBN | 0470971193 9780470971192 |
| DOI | 10.1002/9781119170518.ch7 |
Cover
| Summary: | This chapter discusses the integration of modern features in C++ with object‐oriented design techniques. The goal is to design robust and flexible classes in C++. The chapter first explores two modelling techniques; the Liskov substitution principle (LSP); and the single responsibility principle (SRP). It then discusses how to design classes. In doing so, the chapter introduces a number of language features that improve the robustness and reliability of C++ classes and member functions. It also focuses on the different ways to construct objects and to initialise data. The features are tactical in the sense that they help to improve code quality at class level. Then, the chapter discusses different ways to achieve polymorphic behaviour in classes and class hierarchies. It finally gives an overview of object‐oriented software metrics that measure code quality by providing metrics for classes, their members as well as class hierarchies. |
|---|---|
| ISBN: | 0470971193 9780470971192 |
| DOI: | 10.1002/9781119170518.ch7 |