第11周 儲存班長資訊的學生類

2021-07-11 20:24:11 字數 918 閱讀 1959

/*

*檔名稱:main.cpp

*作    者:李德彪

*版 本 號:v1.0

**問題描述:專案 - 儲存班長資訊的學生類 

*輸入描述:無。

*程式輸出:學生資訊。

*/#include

#include 

using

namespace std;  

class stu   //宣告基類  

;   

stu::stu(int n, string nam )   

void stu::display( )  

class studetail: public stu              //宣告派生類studetail  

;    

studetail::studetail(int n, string nam,int a, string ad,int n1, string nam1):stu(n,nam),age(a),addr(ad),monitor(n1,nam1){}  

void studetail::show( )  

void studetail::show_monitor( )  

int main( )    

/**檔名稱:main.cpp

*作 者:李磊濤

*版 本 號:v1.0

**問題描述:專案 - 儲存班長資訊的學生類

*輸入描述:無。

*程式輸出:學生資訊。

*/#include#include using namespace std;

class stu //宣告基類

; stu::stu(int n, string nam )

void stu::display( ){

cout<<"班長資訊"<

11周 班長資訊儲存 學生類

程式的版權和版本宣告部分 檔名稱 作 者 何新新 完成日期 2014 年 5月 9日 版 本 號 v1.0 對任務及求解方法的描述部分 輸入描述 問題描述 程式輸出 include using namespace std class stu 宣告基類 void display 成員函式,輸出基類資料...

第11周專案2 儲存班長資訊的學生類

include includeusing namespace std class stu 宣告基類 class studetail public stu 宣告派生類studetail stu stu int n,string nam void stu display cout 總結 若派生類中資料成...

第11周專案1 儲存班長資訊的學生類(1)

檔名稱 project.cpp 完成日期 2015年5月19日 版本號 v1.0 問題描述 請完成類中成員函式的定義,完成學生資訊的輸出。輸入描述 略。程式輸出 略。include include using namespace std class stu 宣告基類 class studetail ...