VUDESK

¤Virtual University Of Pakistan Network¤



Welcome Visitors to VUDESK Family .Join VUDESK For Free to Get more Access to study material and lot of infotainment stuff. Stay Connected!!

VUDESk ALL Subject CODES
Find Your Subject Code , Join Group And You Will Get ALL related Data
ACC - Fundamentals of auditing and business
ACC311ACC501
ACF - (Accounting And Finance Related)
ACF619ACFI619
COM - (Commerce Related)
COM619COMI619
ECO - (Economics Related)
ECO401 ECO402 ECO403 ECO404
ENG - (English Related)
ENG001 ENG101 ENG201 ENG301 ENG401
ETH201 - Ethics (for Non-Muslims)
ETH201
ISL201 - Islamic Studies
ISL201
IT - (Info Tech Related
IT000IT0001IT430IT619ITI619
MIS - (Project And Internship Report)
MIS619 MISI619MIS620 MISI620
PAD - (Public Administration Related)
PAD619 PADI619
PAK301 - Pakistan Studies
PAK301PAK302
PHY - (Physics Related)
PHY101 PHY301
PSC201 - International Relations
PSC201PSC401
SOC - (Socialogy Related)
SOC101 SOC401
STA - (Statistics and Research)
STA301 STA630
URDU - (Urdu Related)
URD101

#include<iostream>
#include <string>
#include<stdlib.h>
using namespace std;

//----------------defining Card class----------------------------
class Card{
//data member of Card class
char * ID;
char * Name;

//public interface of Card class
public:
// Default and overloaded constructors
Card();
Card(char * ID,char * Name);

// Setter and Getter fucntions
void set_Name();
void set_ID();

const char * get_Name() const;

void display_Card();

// Destructor
~Card();
// end of Card class
};

// Implementation of overloaded constructor
Card::Card(char * id,char * aname){


Name = new char[strlen(aname)+1];
strcpy(Name,aname);

ID = new char[strlen(id)+1];
strcpy(ID,id);

}

// Implementation of set_Name() method
void Card::set_Name(){
char name[50];
cout"\nEnter Card name:""\n";
cin.getline(name,50);

Name = new char[strlen(name)+1];
strcpy(Name,name);
}

// Implementation of get_Name() method
const char * Card::get_Name() const{
if(Name != NULL){
return Name;

}
}
// Implementation of set_add() method to set the value of ID
void Card::set_ID(){
char id[300];
cout"\nEnter ID:""\n";
cin.getline(id,300);

ID = new char[strlen(id)+1];
strcpy(ID,id);


}
// Implementation of Verify_Card() method, to varify a Card
void Card::display_Card() {
cout"\n\n -------------Card Display---------\n\n";
//----set_Name function call---------
set_Name();
//--------set_ID call---------
set_ID();
//------set status as verified----------
}
// Implementation of destructor
Card::~Card(){
delete []ID;
delete []Name;

}
int main(){

//Card object
Card Card1("",""); // Card class overloaded constructor is called
Card1.display_Card();
system("pause");
}

Views: 81

Replies to This Discussion

Advertise Here

kia ye sol thek hai?

Thanks.

RSS

*Member OF Week*

=======================

Popular Social Events

=======================

+ Member of the Day

+ Member of the Week

+ Member of the Month

+ Member of the Year

+ Miss VU

+ Mr VU

+ Gold Members

+ Vote for Miss VU

+ Vote for Mr VU

+ Members Points Table

+ Profile Points Allocation

+ Competition Corner

+ Our Fans Club

+ Certificate Winners

---------------------------------------

௵ Scholars Of Desk

 Gold Members

 MR VU,S

௵ MISS VU,S

 Members Of Month

 Team Members

 Moderators 

  ADMINS

ʭAdministrationʭ

Senior Admin : Yasmeen

VUDESK Owner : Ismail Shah

DMCA.com

VUDESK GROUPS

© 2013   Created by ʭIsmail Shahʭ.

Badges  |  Report an Issue  |  Terms of Service

-->