Friday, December 30, 2011

Re: [ vuZs.net ] CS401, CS403, CS304 Assignments Required




# include <iostream>


using namespace std ;

class User
{
private:
string d, n, add, st ;
public:
User(string ud, string un, string ua) ;
~User();

void setd(string ud) ;
void setn(string un) ;
void setadd(string ua) ;

void verifyUser() ;
};




User::User(string ud, string un, string ua)
{
d = ud ;
n = un ;
add = ua ;
st = "userClass" ;
}

User::~User()
{
cout << "userClass Destructor" ;
}

void User::setd(string ud)
{
d = ud ;
}

void User::setn(string un)
{
n = un ;
}

void User::setadd(string ua)
{
add = ua ;
}


void User::verifyUser()
{
cout << "User ........" << endl ;
}







class Member:public User
{

private:
string p ;
public:

Member(string ud , string un , string ua , string up);
~Member() ;
void setP(string up) ;
void verifyUser () ;

};





Member::Member(string ud, string un, string ua , string up):User(ud, un, ua )
{
p = up ;
}

Member::~Member()
{
cout << "This is Member class Destructor ! " << endl ;
}


void Member::setP(string up)
{
p = up ;
}

void Member::verifyUser ()
{
cout << "member user ...... " << endl ;
}




class Administrator:public User
{

private:
string ap ;

public:

Administrator(string ud, string un, string ua, string up);
~Administrator() ;

void setAP(string up) ;
void verifyUser () ;

};


//============================

Administrator::Administrator(string ud, string un, string ua , string up):User(ud, un, ua )
{
ap = up ;
}

Administrator::~Administrator()
{
cout << "Admin Destructor" ;
}


void Administrator::setAP(string up)
{
ap = up ;
}

void Administrator::verifyUser ()
{
cout << "admnistrator" << endl ;
}



int main()
{



User a("", "", "") ;
Member b("", "", "","");
Administrator c("", "", "","");

a.verifyUser() ;
b.verifyUser() ;
c.verifyUser() ;


}

yeh lo . 

this is my solution
yeh mai ap ko edit kar k dey raha ho. ap b edit kar laina . coz yehi file mai nai aur b buht logo ko di hai. 

bye


On Thu, Dec 29, 2011 at 10:53 PM, Sehrish Khan <sehrish.mit@gmail.com> wrote:
CS401, CS403, CS304 Assignments Required
If any one have plz send me so thanxxxxxxxxxx plz send me at
sehrish.mit@gmail.com

Sehrish Khan
MIT 2nd Semester

--
--
Please visit www.vuzs.net For Current & Old Papers, Quizzes, Assignments and study material.

To post a new message on this group, send email to vuZs@googlegroups.com

Message Posting Rules: http://vuzs.net/faq/4795-vuzs-google-groups-basic-rules-for-posting-messages.html
--
To unsubscribe from this group, send email to vuZs+unsubscribe@googlegroups.com
--
To join this group Send blank email to vuZs+subscribe@googlegroups.com
or visit
http://groups.google.com/group/vuZs/subscribe

--
--
Please visit www.vuzs.net For Current & Old Papers, Quizzes, Assignments and study material.
 
To post a new message on this group, send email to vuZs@googlegroups.com
 
Message Posting Rules: http://vuzs.net/faq/4795-vuzs-google-groups-basic-rules-for-posting-messages.html
--
To unsubscribe from this group, send email to vuZs+unsubscribe@googlegroups.com
--
To join this group Send blank email to vuZs+subscribe@googlegroups.com
or visit
http://groups.google.com/group/vuZs/subscribe

No comments:

Post a Comment