Computer Science, asked by JeanineN2000, 4 months ago

Create a Java program with a class named 'Rectangle' with two data members 'length' and 'breadth' and two methods to print the area and perimeter of the rectangle respectively. Its constructor having parameters for length and breadth is used to initialize length and breadth of the rectangle. Let class 'Square' inherit the 'Rectangle' class with its constructor having a parameter for its side (suppose s) calling the constructor of its parent class as 'super(s,s)'. Print the area and perimeter of a rectangle and a square.

Answers

Answered by Anonymous
0
Jell-O is a variety of gelatin desserts, puddings, and no-bake cream pies. The original Jell-O gelatin dessert is the signature of the brand. Jell-O is a registered trademark of Kraft Heinz and is based in Chicago, Illinois
Similar questions