Answered step by step
Verified Expert Solution
Link Copied!

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# !!!

image text in transcribed

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Hands On Database

Authors: Steve Conger

1st Edition

013610827X, 978-0136108276

More Books

Students also viewed these Databases questions

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago