Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C# - With VISUAL STUDIO Create an abstract class called shape Shape will have an abstract property called area Shape will have a static backing

C# - With VISUAL STUDIO

Create an abstract class called shape

Shape will have an abstract property called area

Shape will have a static backing field called _count

Shape will have a read-only property that will return the number of shapes created (the _count)

Shape will have a constructor that will increment the count field

Create a concrete class called rectangle

Inherits from shape

Will have 2 fields

Width

Height

No properties for the fields

Will have a constructor that will take in a width and height and will assign them to the fields

Rectangle will implement area and will return the width x height

Create a concrete class called circle

Inherits from shape

One field

Diameter

No properties for the field

Constructor will take in and set the diameter

Returns area ( 3.14 * ( * diameter)* ( * diameter)

Write code that

will create 3 rectangles and return their area

output the number of shapes created

will create 2 circles and return the area

output the number of shapes created

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

Graph Database Modeling With Neo4j

Authors: Ajit Singh

2nd Edition

B0BDWT2XLR, 979-8351798783

More Books

Students also viewed these Databases questions

Question

Methods of Delivery Guidelines for

Answered: 1 week ago