[FONT="]Given the following class[/FONT]
[FONT="]Class list [/FONT]
[FONT="] { friend bool operator >(const List& K, const list& H);[/FONT]
[FONT="] private :[/FONT]
[FONT="] Int A[100];[/FONT]
[FONT="] Int size;[/FONT]
[FONT="] Public:[/FONT]
[FONT="] List(int s=0);[/FONT]
[FONT="] Void set(int B[], int s);[/FONT]
[FONT="] Void get(int B[],int & s);[/FONT]
[FONT="] Void print();[/FONT]
[FONT="] List operator /(const list& K);[/FONT]
[FONT="]};[/FONT]
[FONT="] [/FONT]
[FONT="]Define all functions in the class. The operator > add all elements of K and compare them with sum of all elements of H. The operator / divide[/FONT]
[FONT="]Each element in object one by the corresponding element in second object [/FONT]
[FONT="]And store the result in third object. If the two list does not have the same size store zeros in the extra elements.[/FONT]
[FONT="] [/FONT]
[FONT="] [/FONT]
[FONT="]Test your program[/FONT]
[FONT="] [/FONT]
[FONT="]Int main()[/FONT]
[FONT="]{[/FONT]
[FONT="] List X,Y,Z;[/FONT]
[FONT="] Int p[3]={2,7,8};[/FONT]
[FONT="] Int q[2]= {20,30};[/FONT]
[FONT="] [/FONT]
[FONT="] X.set(p,3);[/FONT]
[FONT="]Y. set(q,2);[/FONT]
[FONT="]If(X>Y) [/FONT]
[FONT="] Cout<< “X=”<<X.print();[/FONT]
[FONT="]Else[/FONT]
[FONT="] Cout<< “Y=”<<Y.print();[/FONT]
[FONT="]Z= Y+X;[/FONT]
[FONT="]Z.print();[/FONT]
[FONT="]Return 0;}[/FONT]
[FONT="]Class list [/FONT]
[FONT="] { friend bool operator >(const List& K, const list& H);[/FONT]
[FONT="] private :[/FONT]
[FONT="] Int A[100];[/FONT]
[FONT="] Int size;[/FONT]
[FONT="] Public:[/FONT]
[FONT="] List(int s=0);[/FONT]
[FONT="] Void set(int B[], int s);[/FONT]
[FONT="] Void get(int B[],int & s);[/FONT]
[FONT="] Void print();[/FONT]
[FONT="] List operator /(const list& K);[/FONT]
[FONT="]};[/FONT]
[FONT="] [/FONT]
[FONT="]Define all functions in the class. The operator > add all elements of K and compare them with sum of all elements of H. The operator / divide[/FONT]
[FONT="]Each element in object one by the corresponding element in second object [/FONT]
[FONT="]And store the result in third object. If the two list does not have the same size store zeros in the extra elements.[/FONT]
[FONT="] [/FONT]
[FONT="] [/FONT]
[FONT="]Test your program[/FONT]
[FONT="] [/FONT]
[FONT="]Int main()[/FONT]
[FONT="]{[/FONT]
[FONT="] List X,Y,Z;[/FONT]
[FONT="] Int p[3]={2,7,8};[/FONT]
[FONT="] Int q[2]= {20,30};[/FONT]
[FONT="] [/FONT]
[FONT="] X.set(p,3);[/FONT]
[FONT="]Y. set(q,2);[/FONT]
[FONT="]If(X>Y) [/FONT]
[FONT="] Cout<< “X=”<<X.print();[/FONT]
[FONT="]Else[/FONT]
[FONT="] Cout<< “Y=”<<Y.print();[/FONT]
[FONT="]Z= Y+X;[/FONT]
[FONT="]Z.print();[/FONT]
[FONT="]Return 0;}[/FONT]









.. منكم نستفيد