#include<iostream.h>
#include<conio.h>
class rec
{
private:
int I;
int b;
public:
rec();
void get();
void area();
~rec();
};
rec::rec()
{
cout<<"Constructor with no parameter invoked " <<endl;
}
void rec::get()
{
cout<<"Enter length & breadth: ";
cin>>I>>b;
}
void rec::area()
{
cout<<"Area is : "<<I*b <<endl;
}
rec::~rec()
{
cout<<"Destructor invoked :"<<endl;
}
void main()
{
clrscr();
rec &obj=*(new rec);
obj.get();
obj.area();
cout<<"End of program";
getch();
}