Question: Using c# !!! Using c# !!! Using c# !!! Implement the Shape hierarchy below by creating an application that uses an array of Shape references
Using c# !!!
Using c# !!!
Using c# !!!


Implement the Shape hierarchy below by creating an application that uses an array of Shape references to objects of each concrete class in the hierarchy. Display a text description of the object to which each array element refers and calculate its area polymorphically. Shape Rectangle Circle Shape hierarchy UML class diagram Area ToString Shape (abstract) abstract name X Position: x Y Position: y Rectangle length * width Rectangle: name X Position: x Y Position: y Length: length Width: width Circle Math.PI * radius * radious Circle: name X Position: x Y Position: y Radious: radious Polymorphic interface for the Shape hierarchy classes Application Output: Rectangle: rect1 X Position: 100 Y Position: 100 Length: 3 Width: 4 Area: 12 Circle: ciri X Position: 300 Y Position: 300 Radious: 2 Area: 12.57
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
