Question: solve this using in c++. create and classes and demonstrate them on the main function. > Shape -color:string = red +Shape(color:string) +getColor():string +setColor (color:string):void +print():
solve this using in c++. create and classes and demonstrate them on the main function.
> Shape -color:string = "red" +Shape(color:string) +getColor():string +setColor (color:string):void +print(): void +getArea(): double Circle -radius:int = 1 Rectangle -length:int = 1 -width: int = 1 +Rectangle(length:int, width:int,color:string) +getLength():int +setLength(length:int):void +getWidth():int +setWidth(width:int): void +print():void +getArea(): double +Circle(radius:int, color:string) +getRadius():int +setRadius(radius:int):void +print():void +getArea(): double
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
