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

正文內(nèi)容

面向?qū)ο蟪绦蛟O(shè)計(jì)編程題復(fù)習(xí)及其答案-資料下載頁

2025-06-23 03:52本頁面
  

【正文】 信,2012,9,6)。 ()。 teacher t(李四,30,39。m39。,講師,3000)。 ()。 return 0。}1includeiostreaminclude stringusing namespace std。class Date{private: int year。 int month。 int day。public: Date(int y=2013,int m=1,int d=1) { year=y。 month=m。 day=d。 } void display() { coutyear年month月day日endl。 }}。class person{private: string name。 int age。 char sex。public: person(string n,int a,char s) { name=n。 age=a。 sex=s。 } void display() { cout姓名:nameendl。 cout年齡:ageendl。 cout性別:sexendl。 }}。class student:virtual public person{public: student(string n,int a,char s,string maj,int y,int m,int d ):person(n,a,s),enterdate(y,m,d) { major=maj。 } void display() { person::display()。 cout專業(yè):majorendl。 cout入學(xué)日期:。 ()。 }private:protected: string major。 Date enterdate。//入學(xué)日期}。class teacher:virtual public person{public: teacher(string n,int a,char s,string t,float w):person(n,a,s) { title=t。 wage=w。 } void display() { person::display()。 cout職稱:titleendl。 }private:protected: string title。 float wage。}。class graduate:public student,public teacher{public: graduate(string n,int a,char s,string maj,int y,int m,int d,string t,float w,string g):person(n,a,s),student(n,a,s,maj,y,m,d),teacher(n,a,s,t,w) { grade=g。 } void display() { person::display()。 cout專業(yè):majorendl。 cout入學(xué)日期:。 ()。 cout職稱:titleendl。 cout年級(jí):gradeendl。 }protected:private: string grade。}。int main(){ student s(張三,20,39。f39。,通信,2012,9,6)。 ()。 teacher t(李四,30,39。m39。,講師,3000)。 ()。 graduate g(王五,28,39。f39。,計(jì)算機(jī),2008,9,6,助教,1500,研二)。 ()。 return 0。}1includeiostreaminclude stringusing namespace std。class Shape{public: virtual void area()=0。}。class Circle:public Shape{public: Circle(double r):radius(r){} virtual void area() { coutCircle area:*radius*radiusendl。 }protected: double radius。}。class Square:public Shape{public: Square(double s):side(s){} virtual void area() { coutSquare area:side*sideendl。 }protected: double side。}。class Rectangle:public Shape{public: Rectangle(double w,double h):width(w),height(h){} virtual void area() { coutRectangle area: width*heightendl。 }protected: double width,height。}。class Trapezoid:public Shape{public: Trapezoid(double t,double b,double h):top(t),bottom(b),height(h){} virtual void area() { coutTrapezoid area:*(top+bottom)*heightendl。 }protected: double top,bottom,height。}。class Triangle:public Shape{public: Triangle(double w,double h):width(w),height(h){} virtual void area() { coutTriangle area: *width*heightendl。 }protected: double width,height。}。int main(){ Circle cirle()。 Square square()。 Rectangle rect(,)。 Trapezoid trape(,)。 Triangle tria(,)。 Shape *p。 p=amp。cirle。 parea()。 p=amp。square。 parea()。 p=amp。rect。 parea()。 p=amp。trape。 parea()。 p=amp。tria。 parea()。 return 0。}天貓優(yōu)惠券
點(diǎn)擊復(fù)制文檔內(nèi)容
黨政相關(guān)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1