PROMOTE MY BLOG: JUST CLICK BELOW BUTTON

Search Any Paper On This Blog

Wednesday, June 15, 2011

Re: ::: vuaskari.com ::: CS304 Assignment 3 Solution Required

#include
class House;
class Room
{ public: Room() { };
static void createRoom_v(Room* (&room), House* hse,
char* name) { room = new Room(hse, name);
} Room(House* hse, char* myName)
{ cout"PakistaniCitizens\n";
myHse_p = hse;
if(NULL != myHse_p)
{ name_p = new char(sizeof(strlen(myName)));
name_p = myName;
} else { cout"Please enter the age of the citizen\n";

} };
~Room() { cout"PakistaniCitizens\n";
myHse_p = NULL;
delete (name_p);
};
void disp() { cout name_p;\\ sulman.maan@gmail.com
cout"\n";
} static void initList_v(Room *(& roomsList_p)[3])
{ roomsList_p[3] = new Room[3];
} private: House * myHse_p;
char * name_p;};
class House{ public: House(char *myName) { cout"PakistaniCitizens\n";
name_p = new char(sizeof(strlen(myName)));;
name_p = myName;
Room::initList_v(roomsList_p);
Room* myRoom;
Room::createRoom_v(myRoom, this, "name");
roomsList_p[0] = myRoom;
Room::createRoom_v(myRoom, this, "age");
roomsList_p[1] = myRoom;
Room::createRoom_v(myRoom, this, "CNIC No");
roomsList_p[2] = myRoom;
} ~House() { cout"PakistaniCitizens\n";
unsigned int i;
cout"Eligible for vote cast...\n";
for(i=0; i<3; ++i) {
if(roomsList_p[i] != NULL)
{ delete (roomsList_p[i]);

} }

delete [] roomsList_p;
delete (name_p);
} void disp()
{ cout"\n\nPakistaniCitizens :"name_p;
if(roomsList_p != NULL) { unsigned int i;
cout"\n\nVotersList...\n";
for(i=0; i<3; ++i) { if(NULL != roomsList_p[i])
{ roomsList_p[i]->disp();
} } cout"\n\n"; } } private:\\sulman.maan@gmail.com
char* name_p;
Room* roomsList_p[3];};
int main(){ cout"\nExample of Composition Relationship\n";
cout"-----------------------------------------\n\n";
House hse("data members");
cout"\n\nPakistaniCitizens...\n";
hse.disp();
cout"Age is less than 18...\n";
return(0);


}

IDEA Solution of cs304 Assignment

--
We say, "Be one as Pakistani Nation and grow up for Pakistan's Future". Wish you all the best. Join www.vuaskari.com,
To post to this group, send email to vuaskari_com@googlegroups.com
Visit these groups:
This (Main) Group:http://groups.google.com/group/vuaskari_com?hl=en?hl=en
MIT/MCS Group: http://groups.google.com/group/vu_askarimit?hl=en?hl=en
HRM Group: http://groups.google.com/group/askari_hrm?hl=en?hl=en
Banking Group: http://groups.google.com/group/askari_banking?hl=en?hl=en
Management: https://groups.google.com/group/vuaskari_mgt?hl=en
Marketing: https://groups.google.com/group/vuaskari_mkt?hl=en
MIS Group: http://groups.google.com/group/askari_mis?hl=en

No comments:

Post a Comment

PLEASE COMMENT ABOUT YOUR VISIT AND MY SITE

Note: Only a member of this blog may post a comment.