<<< Goals of object-oriented design | Index | Keeping coupling loose >>> |
Encapsulation
class Employee { std::string m_name; };//class Employee
Inheritance
class Manager : public Employee
Simple use (as client)
Account acct1; acct1.deposit( 1000000 );
Template instantiation:
std::map< std::string, int > phone_directory;
<<< Goals of object-oriented design | Index | Keeping coupling loose >>> |