Question: Please use Inheritance method to create the class (Java) Please create a testing class and the possible interface is as follows: WELCOME TO Fun Shape

Please use Inheritance method to create the class (Java)

Please use Inheritance method to create the class (Java) Please create a

Please create a testing class and the possible interface is as follows:

WELCOME TO Fun Shape App

How many circle(s) would you like to create? [1]

How many square(s) would you like to create? [1]

How many rectangle(s) would you like to create? [1]

  • What is the colour of your number 1 circle ?
  • What is the radius of your number 1 circle?
  • :

:

:

Shape -color:String "red" -filled:boolean = true +Shape() +Shape(color:String, filled: boolean) +getColor(): String +setColor(color:String):void +isFilled(): boolean +setFilled(filled:boolean):void +toString(): String extends "Shape[color=?, filled=?]" Circle = 1.0 -radius: double +Circle() +Circle(radius: double) +Circle(radius: double, color:String, filled:boolean) +getRadius(): double +setRadius (radius: double): void +getArea(): double +getPerimeter(): double +toString(): String. Rectangle -width: double = 1.0 - length:double = 1.0 +Rectangle() +Rectangle(width:double, length: double) +Rectangle(width:double, length: double, color:String, filled: boolean) +getWidth(): double +setWidth(width: double):void +getLength(): double +setLength(legnth: double):void +getArea(): double +getPerimeter(): double o+toString(): String "Circle(Shape[color=?, filled=?], radius=?]" "Rectangle[Shape[color=?, filled=?],width=?, length=?]" Square The length and width shall be set to the same value. +Square() +Square(side: double) +Square(side: double, color:String, filled:boolean) +getSide(): double +setSide (side: double):void +setWidth(side:double):void +setLength(side: double):void +toString(): String "Square[Rectangle[Shape[color=?, filled=?], width=?, length=?]]

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 Databases Questions!