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

正文內(nèi)容

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

2025-05-11 23:34上一頁面

下一頁面
  

【正文】 }。}18. 先建立一個(gè)Point(點(diǎn))類,包含數(shù)據(jù)成員x,y(坐標(biāo)點(diǎn))。y=b。Circle::Circle(float a,float b,float r):Point(a,b),radius(r){}void Circle::setRadius(float r){radius=r。)。 (5,5)。 }。 coutarea of trapezoid =。 char *str = bMan?男:女。 } void Print() { Output()。 } 。 cout Goods::TotalWeight ( ) endl 。 sec=s。 (d1)。 sec=s。 } int main(){ Time t1(10,30,55)。}。 b ) 。} private: numtype x。 void display(){coutminute:secendl。在定義派生類對象時(shí)給出初始化的數(shù)據(jù)(自已定),然后輸出這些數(shù)據(jù)。} void display1() {coutname:name1endl。f39。 } protected: char title[10]。 return 0。s){cout()endl。class Rectangle:public Shape{public:Rectangle(float i,float j):L(i),W(j){}~Rectangle(){}float GetPerim(){return 2*(L+W)。 include class plex{private: double real。()。c3=c1+c2。plex operator * (plex c1,plex c2) {return plex(**,*+* )。coutcl=。coutc2=。sp=new Rectangle(6,4)。 includeiostreamusing namespace std。class Trapezoid:public Shape{public: Trapezoid(double w,double h,double len):width(w),height(h),length(len){} virtual double area() const {return *height*(width+length)。 int main( ) {Graduate grad1(Wangli,39。 char sex。 coutwages:wageendl。 }。} return 0。include iostreamusing namespace std。}6.實(shí)現(xiàn)重載函數(shù)Double(x),返回值為輸人參數(shù)的兩倍;參數(shù)分別為整型、浮點(diǎn)型、雙精度型,返回值類型與參數(shù)一樣。 } double GetX( ) { return X 。class Distance{public : Distance(Point p,Point q)。 } void display(const Date amp。 int sec。da) {cout//endl。 int sec。 cin w 。}二、第二類題目(20道,每題9分,請自行設(shè)計(jì)輸出格式)1.某商店經(jīng)銷一種貨物,貨物成箱購進(jìn),成箱賣出,購進(jìn)和賣出時(shí)以重量為單位,各箱的重量不一樣,因此,商店需要記下目前庫存貨物的總量,要求把商店貨物購進(jìn)和賣出的情況模擬出來。 i++) cout成績i+1:dbScore[i]endl。\039。 Rectangle rectangle(,)。 }。}int main(){Cylinder cy1(,10)。 float volume() const。,const Circle amp。}。(Name,StuNO,a,b,c)。cout C++成績:fScore[0]英語成績:fScore[1]數(shù)學(xué)成績:fScore[2]endl。()。 friend bool operator(String amp。string1,String amp。}int main(){String string1(Hello),string2(Hello)。string2)。} void Complex::display(){cout(real,imagi)endl。include class Complex {public: Complex(){real=0。j3。b) {Matrix c。初值自擬。}int main(){Complex c1(3,4),c2(5,10),c3。i)。 c3=c1/c2。 }。編程序,分別求出兩個(gè)復(fù)數(shù)之積和商。} Complex Complex::operator(Complex amp。imag=0。 double Complex::get_real(){return real。 return。 int k=0。 for(int i=0。,39。 } 4. 聲明一個(gè)類模板,利用它分別實(shí)現(xiàn)兩個(gè)整數(shù)、浮點(diǎn)數(shù)和字符的比較,求出大數(shù)和小數(shù)。 }3. 有兩個(gè)長方柱,其長、寬、高分別為:(1)12,20,25;(2)10,30,20。 include iostream using namespace std。 public: void int(int x1=0,int y1=0,int z1=0) {x=x1。(2,3,4)。 width=w。 }。 cout() is the Maximum of two inteder numbers.endl。class Student {public: Student(int n,double s):num(n),score(s){} void display()。 }。 p=new int[10]。imag=i。 ()。 double imag。 ()。} Complex operator*(Complex amp。 =(imag**)/(*+*)。include class Complex {public: Complex(){real=0。c){return Complex(real+,imag+)。 coutc1+i=。Matrix::Matrix() {for(int i=0。i2。 ()。 void display()。 return 0。 else return false。string2)。}int main(){String string1(Book),string2(Computer)。string1,String amp。 void SetScore( char sname[12], char NO[9],float s0, float s1, float s2) { strcpy(strName, sname)。 char StuNO[9]。 float getX() const {return x。 return output。output,const Circle amp。}float Cylinder::area() const{ return 2*Circle::area()+2**radius*height。 Circle amp。} protected: double width,height,length。 include include class CPerson {public: void SetData(char *name, char *id, bool isman = 1) { int n = strlen(name)。 }。 Cteacher tea。 static int TotalWeight ( ) { return totalWeight 。include iostreamusing namespace std。 int day。class Date。 private: int month。includeiostreamincludeusing namespace std。 Distance dis(p1,p2)。 b ){ double dx = 。cout()endl。 ++minute。 title=t。 float score。作為人員的一些基本數(shù)據(jù)都放在Person中,在Teacher類和Student類中再增加一些必要的數(shù)據(jù)(Student類中增加score,Teacher類中增加職稱title,Graduate類中增加工資wages)。 coutage:ageendl。class Circle:public Shape{public:Circle(double r):radius(r){} virtual double area() const {return *radius*radius。 coutarea of rectangle =。}float GetArea(){return *R*R。 void display()。 imag=i 。 include class plex{private: double real。public: plex(double r=,double i=){ real=r。 void display()。plex operator (plex c1,plex c2){return plex( , )。}。 Trapezoid trapezoid(,)。 protected: double radius。 coutscore:scoreendl。PersonStudentTeacherGraduateinclude iostreaminclude stringusing namespace std。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。 coutageageendl。}int main(){Time time1(34,0)。cout()endl。 return sqrt( dx * dx + dy * dy ) 。return 0。 Y = yi 。 int year。 friend void display(const Date amp。 }。class Time {public: Time(int,int,int)。 private : int weight 。 ( 80, 76, 91 )。 dbScore[1] =
點(diǎn)擊復(fù)制文檔內(nèi)容
黨政相關(guān)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1