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

正文內(nèi)容

c面向?qū)ο蟪绦蛟O(shè)計上機(jī)考試題庫(存儲版)

2025-04-26 23:34上一頁面

下一頁面
  

【正文】 t weight 。 Goods *g2 = new Goods( w ) 。class Time {public: Time(int,int,int)。 minute=m。 }。 Date d1(3,25,2010)。 friend void display(const Date amp。 minute=m。 int year。 cout::endl。 Y = yi 。 double dist。return 0。 a , Point amp。 return sqrt( dx * dx + dy * dy ) 。} numtype bei() {return 2*x。cout()endl。} Time(int m,int s):minute(m),sec(s){} Time operator++()。}int main(){Time time1(34,0)。學(xué)生類中包括數(shù)據(jù)成員name(姓名),age(年齡),score(成績)。 coutageageendl。 score=sco。class Graduate:public Teacher,public Student {public: Graduate(string nam,int a,char s,string t,float sco,float w): Teacher(nam,a,t),Student(nam,s,sco),wage(w) {} void show( ) {coutname:nameendl。 int main( ) {Graduate grad1(Wangli,24,39。PersonStudentTeacherGraduateinclude iostreaminclude stringusing namespace std。class Teacher:virtual public Person {public: Teacher(char *nam,char s,int a,char *t):Person(nam,s,a) {strcpy(title,t)。 coutscore:scoreendl。 ( )。 protected: double radius。void printArea(const Shape amp。 Trapezoid trapezoid(,)。}。}。} 12.分別用成員函數(shù)和友元函數(shù)重載運算符,使對實型的運算符“”適用于復(fù)數(shù)運算。plex operator (plex c1,plex c2){return plex( , )。coutc3=c1c2=。 void display()。()。public: plex(double r=,double i=){ real=r。} void plex::display() {。 include class plex{private: double real。()。 imag=i 。()。 void display()。coutspGetPerim()endl。}float GetArea(){return *R*R。class Shape{public:Shape(){}~Shape(){}virtual float GetPerim()=0。 coutarea of rectangle =。} protected: double width,height,length。class Circle:public Shape{public:Circle(double r):radius(r){} virtual double area() const {return *radius*radius。f39。 coutage:ageendl。 int age。作為人員的一些基本數(shù)據(jù)都放在Person中,在Teacher類和Student類中再增加一些必要的數(shù)據(jù)(Student類中增加score,Teacher類中增加職稱title,Graduate類中增加工資wages)。 } private: float wage。 float score。class Student {public: Student(string nam,char s,float sco) {name1=nam。 title=t。}8.聲明一個教師(Teacher)類和一個學(xué)生(Student)類,用多重繼承的方式聲明一個研究生(Graduate)派生類。 ++minute。class Time{public: Time(){minute=0。cout()endl。(用類模板實現(xiàn))includeiostreamusing namespace std。 b ){ double dx = 。 } double GetY( ) { return Y 。 Distance dis(p1,p2)。 double Getdist() {return dist。includeiostreamincludeusing namespace std。d,const Time amp。 private: int month。 }。class Date。 couthour:minute:secendl。 int day。 }。include iostreamusing namespace std。 Goods *g1 = new Goods( w ) 。 static int TotalWeight ( ) { return totalWeight 。includeiostreamusing namespace std。 Cteacher tea。 }private: double dbScore[3]。 }。 bMan = isman。 include include class CPerson {public: void SetData(char *name, char *id, bool isman = 1) { int n = strlen(name)。 coutarea of rectangle =。} protected: double width,height,length。class Circle:public Shape{public:Circle(double r):radius(r){} virtual double area() const {return *radius*radius。 Circle amp。 cout\noriginal cylinder:\nx=(), y=(), r= (), h=()\narea=() , volume=()endl。}float Cylinder::area() const{ return 2*Circle::area()+2**radius*height。 friend ostreamamp。output,const Circle amp。)。 return output。Point::Point(float a,float b){x=a。 float getX() const {return x。()。 char StuNO[9]。 } float GetSUM() { return (float)((fScore[0] + fScore[1] + fScore[2]))。 void SetScore( char sname[12], char NO[9],float s0, float s1, float s2) { strcpy(strName, sname)。} coutendl。string1,String amp。string1,String amp。}int main(){String string1(Book),string2(Computer)。string2){if(strcmp(,)0) return true。string2)。 pare(string1,string2)。 else return false。 void display()。 return 0。}int main(){Complex c1(3,4),c2(5,10),c3。 void display()。imag=0。 ()。j++) {coutmat[i][j] 。i2。 for(int i=0。Matrix::Matrix() {for(int i=0。include class Matrix {public: Matrix()。 coutc1+i=。 int i=5。c){return Complex(real+,imag+)。 friend Complex operator+(intamp。include class Complex {public: Complex(){real=0。 coutc1/c2=。 =(imag**)/(*+*)。Complex Complex::operator*(Complex amp。} Complex operator*(Complex amp。初值自擬。 ()。c2){Complex c。 double imag。} Complex(double r,double i){real=r。 ()。}double Complex::get_imag(){return imag。imag=i。}8. 定義一個復(fù)數(shù)類Complex,重載運算符“+”,使之能用于復(fù)數(shù)的加法運算。 p=new int[10]。 for(int i=1。 }。i=2。class Student {public: Student(int n,double s):num(n),score(s){} void display()。A39。 cout() is the Maximum of two inteder numbers.endl。include iostreamusing namespace std。 }。分別求他們的體積。 width=w。 class Box {public: Box(int,int,int)。(2,3,4)。y=y1。 public: void int(int x1=0,int y1=0,int z1=0) {x=x1。void main(){ Box a。 include iostream using namespace std。 height=h。 }3. 有兩個長方柱,其長、寬、高分別為:(1)12,20,25;(2)10,30,20。 int height。 } 4. 聲明一個類模板,利用它分別實現(xiàn)兩個整數(shù)、浮點數(shù)和字符的比較,求出大數(shù)和小數(shù)。int main(){Compareint cmp1(3,7)。,39。include iostreamusing namespace std。 for(
點擊復(fù)制文檔內(nèi)容
黨政相關(guān)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1