當前位置:股票大全官網 - 工商資訊咨詢 - 找壹個用C++語言寫的學生信息管理系統源代碼。

找壹個用C++語言寫的學生信息管理系統源代碼。

# include & ltiostream & gt

# include & lt字符串& gt

# include & ltfstream & gt

# include & ltconio.h & gt

# include & ltwindows.h & gt

使用命名空間std

/////////////////////////////////////

//抽象基類//

///////////////////////////////////

類別基礎

{

受保護:

int id//本科,研究生鑒定

int num

char name[20];

char sex[5];

雙ch,en,ma;//結果

int borth

公共:

base();

virtual int getid()= 0;//本科,研究生鑒定

虛擬void set()= 0;//純虛函數,在派生類中調用

虛擬void display()= 0;

double getsum();//取總分

char * getsex();//取性別

double getch();//獲得所有科目的成績

double geten();

double getma();

int getborth();

int getnum();//取學號

char * getname();//取壹個名字

};

Base::Base()//基類構造

{

num = 0;

strcpy(名,“無名”);

ch = 0;en = 0;ma = 0;

borth = 1900;

}

int Base::getborth()

{返回borth}

double Base::getsum()

{ return ch+en+ma;}

double Base::getch()

{ return ch}

雙基::geten()

{ return en}

雙基::getma()

{還馬;}

int Base::getnum()

{返回號碼;}

char *Base::getsex()

{回報性;}

char * Base::getname()

{返回姓名;}

/////////////////////////////////////

//本科班//

///////////////////////////////////

班級院校:公共課//本科班

{

私人:

int id//本科身份證明