free geoip

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CS304 Object Oriented Programming assignment no 3 fall Semester 22 December 2011
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#1
Object Oriented Programming (CS304)
Assignment No.03

Total Marks 10

Deadline

Your assignment must be uploaded before or on 29th December, 2011.
Rules for Making

It should be clear that your assignment will not get any credit if:

o The assignment is submitted after due date
o The assignment is copied

Objectives

This assignment has been designed so that you would be able to implement the concept of Inheritance in OOP. After the completion of this assignment you should have a good grasp on how to implement.

o Inheritance
o Using basic constructs of OOP in a program

In previous assignments we have understood all the basics of the Electronic Card System including the Object Model Diagram and highlighted the Abstraction of classes in terms of attributes and functions prototype. Now it is time to implement the full system in parts, so this assignment is first step towards it (there will be one more assignment also).
















Assignment:
Object Model for 3rd assignment:



In this assignment you have to code/implement the below said classes in running form these classes are,

• User
• Member
• Administrator




Meaning after completion of this assignment your c++ program will be able to

1. Verify User() of the User class
2. Add member/ Delete member
3. Add admin/ Delete admin



Now for implementing these three classes practically in c++ you have to define classes according to the requirements (solution of second assignment) given below:

1. Implement data members and member functions for each class
2. Implement constructor and destructor for each class
3. Implement setters and getters functions for each class
4. Implement different type of relations between these classes

Now override the “VerifyUser()” function of the “User” class, such that:

If the “Status” is “admin”, then it displays the following message:

“The user is an administrator”

And if “Status” is “member”, then it displays the following message:

“The user is a member”


Sample Example:

//Topic class
class topic{
// Data members of Topic class
int ID;
char * Title;
char discription[200];

//Public interface of topic class
public:
//Default constructor
topic(){
ID=1;
Title=NULL;
}
//parametrized constructor
topic(int id, char *title){
ID=id;
Title=new char[strlen(title)+1];
strcpy(Title,title);
}
//setter function for ID
void setId() {
int id;
cout<<"\nEnter ID: ";
cin>>id;
}


void setTitle() {
char pChar[50];
cout<<endl<<"\nEnter Title: ";
cin.getline(pChar,50);
Title=new char[strlen(pChar)+1];
strcpy(Title,pChar);
}

void setTitle(char * title){
Title=title;
}

void setdiscription(){
cout<<"\nplease enter discription of title"<<endl;
cin.getline(discription,200);
}


int getId(){
return ID;
}

char * getTitle(){
return Title;
}

void add(){
cout<<"\n*****************************************\n";
cout<<"\nAdding new information in add method";
setTitle();
setdiscription();
cout<<"\n*****************************************\n";
}

bool select(){
cout<<"Topic selection Area:"<<endl;
int select;
if (select==1)
cout<<"\nTopic is selected"<<endl;
else
cout<<"\nTopic is not selected"<<endl;
}

int search(){
cout<<"In Search Mehtod:"<<endl;
int found=0;
if (found)
return 1;
else
return 0;
}

void View() {
cout<<"Viewing the Information";
cout<<"\n*****************************************\n";
cout<<"\nTitle is:"<< Title ;
cout<<endl<<"\nDescription is:"<<discription[100];
cout<<"\n*****************************************\n";
}

void print(){
cout<<"\n*****************************************\n";
cout<<endl<<"\nPrinting the Information:"<<endl;
cout<<"Title:"<<Title<<endl<<"Discription:"<<discription;
cout<<"\n*****************************************\n";
}

void download(){
cout<<"\n*****************************************\n";
cout<<"\nDownloading the information:"<<endl;
cout<<"Downloading under processing, Please wait:"<<endl;
cout<<"You are downloding the following:"<<endl<<Title<<"file";
cout<<" and the following discription"<<endl<<discription<<"File";
cout<<"\n*****************************************\n";

}

void remove(){
cout<<"\n*****************************************\n";
cout<<"\nDeleting the information"<<endl;
cout<<"\n*****************************************\n";
delete []Title;
delete [] discription;
}

~topic(){

}
};



class SubTopic: public topic {
int SubID;
char * title;
char discription[100];

public:

void setSubID(){
int subid;
cout<<"Enter ID of Sub topic:";
cin>>subid;
}

void setdiscription(char []){
char dChar[200];
cout<<"Enter discription of Sub topic:"<<endl;
cin.getline(dChar,200,'\n');
}

int getSubID(){
return SubID;
}

void setTitle(){
char pChar[50];
char dChar[200];
cout<<endl<<"Enter Title : ";
cin.getline(pChar,50);
cout<<endl<<"Enter Title discription:";
cin.getline(dChar,200);
if(strlen(dChar)>=90){
cout<<"Eligible for being a topic"<<endl;
}
else
{
cout<<"Title just contains name and no description"<<endl;
}
}

~SubTopic(){


}

};


Important Note:

This assignment only implement the “Members related functions (data members, constructor/ destructor, setters and getters functions, domain knowledge member functions etc)” of “Electronic Card System”, next assignment may be based on “Cards information” of “Electronic Card System”

Uploading Instructions:
You have to upload your running zipped Dev c++ project.


Attached Files
.doc   Fall 2011_CS304_3.doc (Size: 82.5 KB / Downloads: 119)

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  CS301 Assignment # 4 Due Date: 02-Feb-2016 Vuhelper 0 2,356 02-03-2016, 05:38 PM
Last Post: Vuhelper
  CS703 – Advanced Operating Systems Assignment No.3 solution January 2016 Vuhelper 0 5,943 01-23-2016, 09:58 PM
Last Post: Vuhelper
  CS601 Data Communication Assignment No. 03 Solution 23rd January 2016 Vuhelper 1 1,970 01-23-2016, 06:09 PM
Last Post: Vuhelper
  CS403 Assignment No. 03 Solution 23rd January 2016 Vuhelper 2 1,209 01-23-2016, 03:18 PM
Last Post: Vuhelper
  CS506 Web Design and Development Assignment no 3 Solution 3rd January 2016 Vuhelper 0 2,280 01-23-2016, 03:16 PM
Last Post: Vuhelper
  CS724 Software Process Improvement Assignment No 01 Solution 20th January 2016 Vuhelper 0 2,007 01-20-2016, 06:26 PM
Last Post: Vuhelper
  CS711 Software Design Assignment No 01 Solution Due Date Feb 12, 2016 Vuhelper 0 1,700 01-20-2016, 06:24 PM
Last Post: Vuhelper
  CS709 Formal Methods for Software Engineering Assignment No 01 Solution January 2016 Vuhelper 0 1,838 01-20-2016, 06:22 PM
Last Post: Vuhelper
  cs703 assignment no 3 Solution 20th January 2016 Vuhelper 0 1,739 01-20-2016, 06:20 PM
Last Post: Vuhelper
  CS704 Assignment No. 01 Solution January 2016 Vuhelper 0 4,833 01-20-2016, 06:19 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support