freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

c上機(jī)實(shí)驗(yàn)報(bào)告(編輯修改稿)

2025-09-22 05:32 本頁面
 

【文章內(nèi)容簡(jiǎn)介】 ublic: void get_value_1()。void display1()。private: int age。char addr[30]。}。 void Student1::get_value_1(){get_value()。cinageaddr。} void Student1::display1(){cout int main(){Student1 stud1。()。()。return 0。}( 3) include using namespace std。class Student {public: void get_value()。void display()。protected: int num。 char name[10]。 char sex。}。 void Student::get_value(){cinnumnamesex。} void Student::display(){cout class Student1:public Student {public: void get_value_1()。void display1()。private: int age。 char addr[30]。}。 void Student1::get_value_1(){get_value()。cinageaddr。} void Student1::display1(){cout int main(){Student1 stud1。()。()。return 0。}( 4) include include using namespace std。class Teacher {public: Teacher(int,char[],char)。void display()。private: int num。char name[20]。char sex。}。 Teacher::Teacher(int n,char nam[],char s){num=n。strcpy(name,nam)。sex=s。} void Teacher::display(){cout class BirthDate {public: BirthDate(int,int,int)。void display()。void change(int,int,int)。private: int year。int month。int day。}。 BirthDate::BirthDate(int y,int m,int d){year=y。month=m。day=d。} Void BithDate::display(){cout void BirthDate::change(int y,int m,int d){year=y。month=m。day=d。} class Professor:public Teacher {public: Professor(int,char[],char,int,int,int,float)。void display()。void change(int,int,int)。private: float area。BirthDate birthday。} Professor::Professor(int n,char name[20],char s,int y,int m,int d,float a): Teacher(n,name,s),birthday(y,m,d),area(a){} void Professor::display(){Teacher::display()。()。cout Int main(){Professor profl(3012,”Zhang”,’f’,1949,10,1,)。cout 實(shí)驗(yàn) 10( 1) c1+c2=(8,6i)c1c2=(2,14i)c1*c2=(55,10i)c1/c2=(,)( 2)c1+c2=(8,6i)i+c1=(8,4i)c1+i=(8,4i) ( 3) input value of Matrix:11 22 33 44 55 66 input value of Matrix:12 13 14 15 16 17 Matrix a: 11 22 33 44 55 66 Matrix b: 12 13 14 15 16 17 Matrix c=Matrix a + Matrix b : 23 25 47 59 71 83 ( 4) student1 : num :20240 name:Wang sex:m score; Teacher2: num:20240 name:Wang sex:m pay:1500 實(shí)驗(yàn) 11( 1) 10101 Li M 20 Beijing num:10101 name:Li sex:M age:20 address:Beijing ( 2) 10101 Li M 20 Beijing num:10101 name:Li sex:M age:20 address:Beijing ( 3) 10101 Li M 20 Beijing num:10101 name:Li sex:M age:20 address:Beijing ( 4) The original data: num:3012 name:Zhang sex:f area: The new data: num:3012 name:Zhang sex:f birthday:6/1/1950 area: 這一次上機(jī)實(shí)驗(yàn),除了了解到了運(yùn)算符重載的概念和用法,掌握幾種常用的運(yùn)算符重載的方法,了解轉(zhuǎn)換構(gòu)造函數(shù)的使用方法,同時(shí)也能了解虛基類的用法,理解繼承與派生的概念。 但是,最主要的,我覺得,是通過這一次的上機(jī)實(shí)驗(yàn),我了解到,有的實(shí)驗(yàn)本身是沒有程序錯(cuò)誤的,但是,也會(huì)由于實(shí)驗(yàn)環(huán)境的影響而不能正常運(yùn)行。換句話說,有的程序并不能在 Visaul C++的環(huán)境下運(yùn)行,而不是程序自身的問題。所以,對(duì)于沒辦法調(diào)試成功的程序,我們也不 能一味的認(rèn)為程序有錯(cuò)誤,要學(xué)會(huì)理性的判斷程序的對(duì)錯(cuò),再下結(jié)論。 第三篇: C++上機(jī)實(shí)驗(yàn)報(bào)告 5(定稿) C++程序?qū)嶒?yàn)報(bào)告 實(shí)驗(yàn)五繼承與派生 實(shí)驗(yàn)?zāi)康? ,定義派生類 利用虛基類解決二義性問題 實(shí)驗(yàn)要求 Animal,有私有整型成員變量 age,構(gòu)造其派生類 dog,在其成員函數(shù) SetAge( int n)中直接給 age賦值,看看會(huì)有什么問題,把 age改為公有成員變量,還會(huì)有問題嗎?編程嘗試。 BaseClass,有整型變量 Number,構(gòu)造其派生類 DerivedClass,觀察構(gòu)造函數(shù)和析構(gòu)函數(shù)的執(zhí)行情況。 ( vehicle)基類,具有 Maxspeed、 Weight 等成員, Run、 Stop等成員函數(shù),由此派生出自行車( bicycle)類、汽車( motorcar)類。自行車( bicycle)類有高度( Height)等屬性,汽車( motorcar)類有座位數(shù)( SeatNun)等屬性。從 bicycle和 motorcar派生出摩托車( motorbicycle)類,在繼承過程中,注意把 vehicle設(shè)置為虛基類。如果不把 vehicle設(shè)置為虛基類,會(huì)有什么問題?編程嘗試。實(shí)驗(yàn)內(nèi)容及實(shí)驗(yàn)步驟 Animal,成員變量 age定義為私有的。構(gòu)造派生類 dog,在其成員函數(shù) SetAge( int n)中直接對(duì) age賦值時(shí),會(huì)出現(xiàn)類似以下的錯(cuò)誤提示
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1