Member Avatar
//how can make this program by composite class.plz conver this program using composition...............................!
class point {
friend class circle;
private :

int x,y;
point (int xx,int yy )//:(int x(xx),int y(yy)){}
class circle{
float r;
point p1,p2;

public :

circle (){r=0;}
circle (int a,int b,int c,int d){

int area()
return 3.1415*r*r;

int main(){
circle c(1,2,3,4);

jonsca commented: Can you ask a question for once, instead of dumping this junk off with no formatting, over and over -2
Member Avatar

i want make this program by using composition.plz tell me about composition or give me hints,

Member Avatar

i make this prgram using frnd function.

friend class circle

if we use composite class i change this program.