Connect on Whatsapp : +1 206 673 2541, Uninterrupted Access 24x7, 100% Confidential. Connect Now

Programming Languages

Create a class named ’Rectangle’ with two data members- length and breadth and a method to calculate the area which is ’length*breadth’. The class has three constructors which are: 1 – Having no parameter – values of both length and breadth are assigned zero. 2 – Having two numbers as parameters – the two numbers are assigned as length and breadth respectively. 3 – Having one number as parameter – both length and breadth are assigned that number. Now, create objects of the ’Rectangle’ class having none, one and two parameters and print their areas.


Looking for help with your homework?
Grab a 30% Discount and Get your paper done!

30% OFF
Turnitin Report
Title Page
Place an Order

Calculate your paper price
Pages (550 words)
Approximate price: -