It is always important to have a well-designed class before writing down any code. Having a class laid out on paper before writing the code allows programmers to see any design flaws before they have coded those flaws into their classes. Determining which classes are needed, what data those classes hold, and how those classes behave are the main objectives of OOP.
The specifications of a class that models a rectangular shape would be: