Area of Rectangle using classes

Question:

Calculate area of a rectangle using classes

Program:

Explanation:
A class rect is created with two breadth and length, and method area which tabulates the area of the rectangle.
An object obj of class rect is created and used

Output:

Leave a Reply