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