Question: TestDriver::ShapeTest requests Factory::ShapeFactory +main(args:String) -input:Scanner +createShape(choice:int):Shape creates > Factory::Shape +calculateArea():double PossibleObjects::Circle PossibleObjects::Square -radius:double -side:double +Circle(radius:double) +Square(side:double) +calculateArea():double +calculateArea():double +toString():String +toString():String

 TestDriver::ShapeTest requests Factory::ShapeFactory +main(args:String) -input:Scanner +createShape(choice:int):Shape creates > Factory::Shape +calculateArea():double PossibleObjects::Circle

TestDriver::ShapeTest requests Factory::ShapeFactory +main(args:String) -input:Scanner +createShape(choice:int):Shape creates > Factory::Shape +calculateArea():double PossibleObjects::Circle PossibleObjects::Square -radius:double -side:double +Circle(radius:double) +Square(side:double) +calculateArea():double +calculateArea():double +toString():String +toString():String

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!