第十三次实验报告.docVIP

  1. 1、本文档共4页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  5. 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  6. 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  7. 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  8. 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
第十三次实验报告

学生实验报告 学生姓名 学号 同组人 实验项目 Homework 13 □必修 □选修 □演示性实验 □验证性实验 □操作性实验 □综合性实验 实验地点 实验仪器台号 指导教师 实验日期及节次 一、实验综述 1、实验目的及要求 开发一个简单的大学人员管理程序,该程序可以管理大学的一些基本人员:学生(student)、教员(faculty)、教授(professor),还有部分教员在工作的同时在职修读学位,因此具有教员和学生的双重身份。类的继承关系,如下图所示: 为每个类定义一个输出函数print(),输出该人员的相关信息。 2、实验仪器、设备或软件 二、实验过程(实验步骤、记录、数据、分析) /*This program is designed to take charge of people in college,such as student,faculty,professor and so on.*/ #include iostream #include string using namespace std; class person { //class person private: string Name; char Sex; int Age; public : person (string n,char s,int a) { Name=n; Sex=s; Age=a; } ~person (){} void print () { coutName:Name\tSex:Sex\tAge:Ageendl; } }; class student:public person{ //class student private : int Student_number; //student number double Score; //score public : student (string n,char s,int a,int sn,double sc):person (n,s,a) { Student_number=sn; Score=sc; } void print () { person::print(); coutStudent Number:Student_number\tScore:Scoreendl; } }; class faculty:public person{ //faculty private: int Faculty_number; string subject; public: faculty(string n,char s,int a,int fn,string sub):person (n,s,a) { Faculty_number=fn; subject=sub; } void print () { person::print(); coutFaculty Number:Faculty_number\tsubject:subjectendl; } }; class professor:public faculty{ //professor private: string title; //professortitle public: professor(string n,char s,int a,int fn,string sub,string t):faculty(n,s,a,fn,sub) { title=t; } void print () { faculty::print (); coutTitle:titleendl; } }; class studentFaculty:public faculty,public student{ //the class that includes faculty class and student class public: studentFaculty(string n,char s,int a,int fn,string sub,string t,int sn,double sc):faculty (n,s,a,fn,sub),student(n,s,a,sn,sc){} void print() {

文档评论(0)

xcs88858 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

版权声明书
用户编号:8130065136000003

1亿VIP精品文档

相关文档