In This Chapter
Classes as Types
Case Study: Cyber Bank Application
Case Study: The Fraction Data Type
In C++ it’s harder to shoot yourself in the foot, but when you do, you blow off your whole leg.
Object-oriented programming (OOP) in C++ is centered on the
class construct. You saw the
class construct in Chapter 9, “Medium-Scale Problems,” where it was used to create data records for a database. However, the
class has a much more important role in C++: creating abstract data types. An abstract data type (ADT) is a user-defined data type. These ADTs behave like the classes discussed in Chapter 10, “Introduction to Object-Oriented Design.” ADTs describe the structure (attributes ...