文件名称:7
介绍说明--下载内容均来自于网络,请自行研究使用
声明一个抽象类Med作为基类,其中仅包含一个string 类型数据成员title(名称)和两个纯虚函数print()和id()。然后派生出Book类,CD类和Mag类。在Book类中,包含3个string类型数据成员 author(作者), pub(出版者), isbn(书号)和函数成员print()和id()。在CD类中,包含3个string类型数据成员composer(制作者), make(介质形式), number(编号)和函数成员print()和id()。在Mag类中,包含2个string类型数据成员issn(杂志编号), pub(出版者),两个整型数据成员volume(卷), number(号)和函数成员print()和id()。
派生类的print()和id()函数功能请自行设计。-Med declare an abstract class as a base class, which contains only one string type data member title (name) and two pure virtual function print () and id (). Then derive Book class, CD Mag classes and class. In the Book class, including three string type data members author (authors), pub (publisher), isbn (ISBN) and function members print () and id (). In the CD class, including three string type data members composer (creator), make (medium format), number (ID) and function members print () and id (). In Mag class contains two string type data members issn (magazine number), pub (publisher), a member of two integer data volume (volume), number (No.) and function members print () and id (). Derived class print () and id () Function Please design themselves.
派生类的print()和id()函数功能请自行设计。-Med declare an abstract class as a base class, which contains only one string type data member title (name) and two pure virtual function print () and id (). Then derive Book class, CD Mag classes and class. In the Book class, including three string type data members author (authors), pub (publisher), isbn (ISBN) and function members print () and id (). In the CD class, including three string type data members composer (creator), make (medium format), number (ID) and function members print () and id (). In Mag class contains two string type data members issn (magazine number), pub (publisher), a member of two integer data volume (volume), number (No.) and function members print () and id (). Derived class print () and id () Function Please design themselves.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
homework
........\hw7_1.cpp
........\hw7_2.cpp
lab
...\lab7_1.cpp
...\lab7_2.cpp
...\lab7_3.cpp