Question: Define a class Rectangle with private members length and width. Create a constructor that initializes these members. The class should have a member function area
Define a class Rectangle with private members length and width. Create a
constructor that initializes these members. The class should have a member function area that returns the
area of the rectangle. Write a program that creates two Rectangle objects with different dimensions and
prints their areas.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
