#include<iostream.h>
#include<conio.h>
class base
{
private: int x, y;
public:
virtual void getdata();
virtual void display();
};
class derived : public base
{
private:
char a, b;
public:
void getdata();
void display();
};
void base :: getdata()
{
cout<<"Enter any two intergers : ";
cin>>x>>y;
}
void base :: display()
{
cout<<"The entered integers are: ";
cin>>x>>y;
}
void derived :: getdata()
{
cout<<"Enter any two characters : ";
cin>> a>>b;
}
void derived :: display()
{
cout<<"The entered characters are : " <<endl<<a<<endl<<b;
}
int main()
{
class base obj1;
class derived obj2;
class base *ptr;
ptr = &obj1;
ptr =&obj2;
clrscr();ptr -> getdata();
ptr -> display();
getch();
return 0;
}
SiteMap
|
Link Us
...Language...
English
French
German
Hindi
Italian
Russian
Japanese
Chinese
Home
|
About Us
|
Portfolio
|
Services
|
Career
|
Contact Us
|
Industrial Training
|
Achievement
Corporate Services
Web Design and development
Web Promotion (SEO)
Multimedia/CD Presentation
Software development
E.Commerce
Training@balujalabs
Software Courses
Hardware Courses
Networking.Courses
Mobile Repairing Courses
UGC Degrees
Student Corner
Programming & Projects
Placement Papers
Project Ideas
Synopsis Ideas
Franchise Section
Administrator
Franchise Inquiry
To demonstrate the operation of late binding of member function of a class.
1
To demonstrate the operations of static binding of the member function of the class.
2
To demonstrate the use of virtual function with the help of pointers.
3
To demonstrate the use of virtual function with inline substitution.
4
To demonstrate the operation of late binding of member function of a class.
5
To apply the arithmetic operations (+, *) on the given integers through various functions based on static binding.
6
To apply the arithmetic operations (+, *) on the given integers through various functions based on late binding.
7
To demonstrate the concept of polymorphism applied to the member functions
8
To illustrate the operation of a pure virtual function having function definition outside the class.
9
To illustrate the operation of pure function having function declared and defined inside the class definition.
10
To demonstrate multiple inheritance without using virtual classes.
11
To demonstrate multiple inheritances without base classes.
12
Write a program to enter information of a student and display it by using the static binding technique.
13
.Write a program to enter information of an employee and display it by using the late binding technique.
14
Write a program to demonstrate the operation of virtual function using late binding technique.
15
Write a program to demonstrate the pure virtual functions.
16
Write a program to demonstrate the operation of virtual base classes.
Home
|
About Us
|
Portfolio
|
Services
|
Career
|
Contact Us
|
Industrial Training
|
Achievement