Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started