Programming in c++ Structured Types, Data Abstraction and Classes Dale/eems/Headington
1 Structured Types, Data Abstraction and Classes
Programming in C++ Chapter 11 Topics 8 Meaning of a Structured Data Type o Declaring and Using a struct Data Type s C++ union Data Type s Meaning of an Abstract Data Type Declaring and Using a class Data Type Using Separate Specification and Implementation Files Invoking class Member Functions in Client Code C++ class Constructors
2 Chapter 11 Topics ❖Meaning of a Structured Data Type ❖Declaring and Using a struct Data Type ❖C++ union Data Type ❖Meaning of an Abstract Data Type ❖Declaring and Using a class Data Type ❖Using Separate Specification and Implementation Files ❖Invoking class Member Functions in Client Code ❖C++ class Constructors
Programming in C++ C++ Data Types simple structured integral enum floating array struct union class char short int long bool float double long double address pointer reference
3 C++ Data Types structured array struct union class address pointer reference simple integral enum char short int long bool floating float double long double
Programming in C++ Structured Data Type A structured data type is a type in which each value is a collection of component items the entire collection has a single name o each component can be accessed individually
4 Structured Data Type A structured data type is a type in which each value is a collection of component items. • the entire collection has a single name • each component can be accessed individually
Programming in C++ C++ Structured Type % often we have related information of various types that we'd like to store together for convenient access under the same identifier, for example
5 C++ Structured Type ❖often we have related information of various types that we’d like to store together for convenient access under the same identifier, for example . .