/* Class Rectangle with a constructor instead of the "initialize"
method. */


#include <iostream>
using namespace std;

// Definition of class Rectangle begins here.
// Specification part of class Rectangle
class Rectangle
{
private:

	float length,width;
public:
	Rectangle(float l, float w);
	float area();								
}; 
// Declaration of class Rectangle ends here.

int main()
{
	float len, wid;
	cout << "Enter the length followed by the width: ";
	cin >> len >> wid;
	Rectangle rec(len,wid); 
	// rec(len,wid); // ERROR
	// Rectangle rec2; // ERROR
	cout << "The area is: " << rec.area() << endl;
	return 0;
}

// Implementation part of class Rectangle

// Definition of function Initialize of class Rectangle
Rectangle::Rectangle(float l, float w)
{
	length = l;
	width = w;
}

// Definition of function Area of class Rectangle
float Rectangle::area()
{
	return length * width;
}

