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

Recommended Answers

Sorry, I have no idea what you want.

Jump to Post

All 4 Replies

Sorry, I have no idea what you want.

Member Avatar

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

what do you mean by "composition" ?

Member Avatar

i make this prgram using frnd function.

friend class circle

if we use composite class i change this program.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.