PPT Slide
class Rectangle extends Shape {
private int length, width;
Rectangle (int l, int w) {
this( l, w, “rectangle”);
Rectangle (int l, int w, String n) {
public String getName () {
return (super.getName());
public String toString () {
+ " and width " + width);