xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 94KB
    文件類型: .rar
    金幣: 2
    下載: 2 次
    發布日期: 2021-06-26
  • 語言: C/C++
  • 標簽: C??C++??

資源簡介

南京郵電大學課程設計,內含詳細的源碼和試驗報告!

資源截圖

代碼片段和文件信息

#include
#include
#include
#include?
class?Student{
private:
??char?StuNumber[10];
??char?Sex;
??int?Height;
??int?Weight;
public:
??Student()
??{
???cout<<“Student?constructing...“<??}
??~Student()
??{
???cout<<“Student?Destructing...“<??}
??friend?void?Input(fstreamStudent?*);
??friend?void?Search(fstreamStudent?*);
??friend?void?Search1(fstreamStudent?*);
??friend?void?MaxandMinHeightSearch(fstreamStudent?*);
??friend?void?MaxandMinWeightSearch(fstreamStudent?*);
??friend?void?PercentHeightandWeight(fstreamStudent?*);
??friend?void?Health(fstreamStudent?*);
??friend?ostream?&operator<<(ostream?&outStudent?&stu);
??friend?istream?&operator>>(istream?&inStudent?&stu);
};
//重載運算符<<
ostream?&operator<<(ostream?&outStudent?&stu)
{
out<??return?out;
}
//重載運算符>>以方便下面整體輸出
istream?&operator>>(istream?&inStudent?&stu)
{
??in>>stu.StuNumber>>stu.Sex>>stu.Height>>stu.Weight;
??return?in;
}
//輸入學生信息的函數
void?Input(fstream?opStudent?*p)
{
??int?numcounter=1;
??cout<<“請輸入學生總數:“;
??cin>>num;
??cout<<“請按以下格式錄入學生信息:“<??cout<<“??學號???性別???身高???體重“<??cout<<“---------------------------------------“<??while(counter<=num)
??{
???cin>>*p;
???op.write((char?*)?psizeof(Student));
???counter++;
??}
??cout<<“---------------------------------------“<}
//查詢所有數據的函數
void?Search(fstream?opStudent?*p)
{
??int?flag=0;
??cout<<“---------------------------------------“<??while(op.read((char?*)?psizeof(Student)))
??{
???cout<<*p<??flag=1;
??}
??if(!flag)
??{
???cout<<“數據庫中沒有數據“<??}
??cout<<“---------------------------------------“<}
//按學號查詢數據的函數
void?Search1(fstream?opStudent?*p)
{
??char?str[10];
??int?flag=0;
??cout<<“---------------------------------------“<??cout<<“請輸入需要查詢的學生學號:“;
??cin>>str;
??while(op.read((char?*)?psizeof(Student)))
??{
???if(strcmp(strp->StuNumber)==0)
???{
????cout<<*p<????flag=1;
???}
??}
??if(!flag)
??{
???cout<<“對不起,沒有符合您的要求的數據“<??}
??cout<<“---------------------------------------“<}
//按性別查詢具有最大身高、最小身高的學生的情況數據的函數
void?MaxandMinHeightSearch(fstream?opStudent?*p)
{
??char?a;
??int?str[12];
??int?i=0;
??int?flag=0;
??cout<<“---------------------------------------“<??cout<<“請輸入需要查詢的最大身高、最小身高的學生的性別:“<??cin>>a;??
??cout<<“---------------------------------------“<??while(op.read((char?*)?psizeof(Student)))
??{
???if(a==p->Sex)
???{
????str[i]=p->Height;
????i++;
?flag=1;
???}
??}
??op.close();
???int?max=str[0]min=str[0];
???for(int?j=1;j???{
????if(str[j]>max)
????max=str[j];
???else?if(str[j]????min=str[j];
??}
???op.open(“D:\\Shealth.txt“ios::in|ios::app);
while(op.read((char?*)?psizeof(Student)))
??{
??if(a==p->Sex)
??{
???????if(max==p->Height)

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件????????360??2007-06-07?16:17??程序設計B06021933\Shealth.txt

?????文件????????200??2007-06-07?16:35??程序設計B06021933\wrong.txt

?????文件???????9459??2007-06-07?16:32??程序設計B06021933\學生健康狀況調查系統-B06021933.cpp

?????文件?????229448??2007-06-07?16:29??程序設計B06021933\學生健康狀況調查系統-B06021933.exe

?????文件?????249856??2008-02-29?17:35??程序設計B06021933\程序設計報告—B06021933.doc

?????目錄??????????0??2008-03-08?15:12??程序設計B06021933

-----------?---------??----------?-----??----

???????????????489323????????????????????6


評論

共有 條評論