文件名称:2.2
介绍说明--下载内容来自于网络,使用问题请自行百度
某出版系统发行图书和磁带,利用继承设计管理出版物的类。要求如下:建立一个基类Publication存储出版物的标题title、出版物名称name、单价price及出版日期date。用Book类和Tape类分别管理图书和磁带,它们都从Publication类派生。Book类具有保存图书页数的数据成员page,Tape类具有保存播放时间的数据成员playtime。每个类都有构造函数、析构函数,且都有用于从键盘获取数据的成员函数inputData(),用于显示数据的成员函数display()。-A publishing system distribute books and tapes, using class inheritance design management publications. Requirements are as follows: to establish a base class Publication store the title of the Publication title, Publication name name, unit price, price and date of Publication date. With Book class and Tape class management books and tapes, respectively, they are all derived the Publication class. Book class has a save page Book pages of the data members, Tape class has kept playing time data members playtime. Each class has a constructor, destructor, and member functions are used to obtain data the keyboard inputData (), is used to display data member function display ().
(系统自动生成,下载前可以参看下载内容)
下载文件列表
2.2.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.