Docsity

Inheritance-Object Oriented Programming and Information Systems-Assignment, Exercises of Information Systems

Toggle sidebar
bg1
Object Oriented Programming (CS304)
1
Object Oriented Programming (CS304)
Assignment No.03
Total Marks 20
Deadline
Your assignment must be uploaded before or on 11th June, 2012.
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 Song Library
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.
docsity.com
pf3
pf4
pf5

Partial preview of the text

Download Inheritance-Object Oriented Programming and Information Systems-Assignment and more Exercises Information Systems in PDF only on Docsity!

Object Oriented Programming (CS304) 1

Object Oriented Programming (CS304)

Assignment No.

Total Marks 20

Deadline

Your assignment must be uploaded before or on 11th^ June, 2012.

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 Song Library 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.

Object Oriented Programming (CS304) 2

Assignment:

Object Model for 3 rd^ assignment:

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

 User  Listener  Administrator

Now for implementing these three classes practically in c++ you have to define classes according to the requirements 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

Sample Example:

Object Oriented Programming (CS304) 4

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];

Object Oriented Programming (CS304) 5

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(){