Input
Output
#include <iostream> using namespace std; class Rectangle{ private: // hidden data from outside world int length = 5, breadth = 6; float area; public: void get_data() { cout << "Enter the length and breadth value: " ; cout << length << breadth << endl; area = length * breadth; } void show_data() { cout << "Area of the Rectangle: " << area; } }; int main(){ Rectangle r1; r1.get_data(); r1.show_data(); return 0; }