You are on page 1of 1

Inventory

Shape shapes[]
static int numberOfShapes

Inventory()
Inventory(int sizeOfInventory)
void insertShape(Shape s)
void removeShape(Shape s)
void showAllShapes()
Shape
void showShapesByType(String type)
String typeOfShape

double area()
void setTypeofShape(String type)
String getTypeofShape()
void showDetails()

Rectangle Triangle Circle


double length double base double radius
double width double height

Rectangle() Triangle() Circle()


Rectangle(double length,double width) Triangle(double base,double height) Circle(double radius)
double area() double area() double area()
void showDetails() void showDetails() void showDetails()

*** Create all the classes. Create an Extra class Named Start to demonstrate
the use of all the methods and polymorphic behavior of objects

You might also like