正在加载图片...
Concepts about class u Class components From the view of Type Data members ( Built-in, user-defined), or Attributes Member functions(function, operator), or Methods, Behaviors From the view of role Public Interface Private Implementation Encapsulation Class users only access public interface, need not be aware of the internal details of implementation No matter how dramatically the internal implementation changed client codes need not be modified if interface is fixed ■ struct in c++ a Taken as a special type of class which has no member functions, and all data members are publicConcepts about class ◼ Class components ◼ From the view of Type – Data members (Built-in, user-defined), or Attributes – Member functions (function, operator), or Methods, Behaviors ◼ From the view of Role – Public Interface – Private Implementation ◼ Encapsulation ◼ Class users only access public interface, need not be aware of the internal details of implementation ◼ No matter how dramatically the internal implementation changed, client codes need not be modified if interface is fixed ◼ struct in C++ ◼ Taken as a special type of class, which has no member functions, and all data members are public
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有