Create a C# library project that calculates the total area of all shapes in a collection.
Details
For simplicity, two types of shapes are required below
Circle
Rectangle
Support of adding different types of shapes in the future with minimum change to code is desired.
Each shape object contains two properties below.
Name
1. The name of a shape, e.g. ‘Red Circle’, ‘Blue Rectangle’, which is provided by callers or users
2. An identity for the type of a shape within a collection. That is, the name of a shape is unique for that type of the shape within a collection.
Creation Date
1. The date when a shape object is created, e.g. 12 Jun 2019
2. Circles are allowed to be created on weekdays, not allowed to be created on weekends.
3. Rectangles are allowed to be created on weekends, not allowed to be created on weekdays
Finally, calculate the total area of all shapes in a collection.
What I have tried:
Which all class have to be created and how to use dictionary in this context.
I would like to create a class shape with two properties as Name and Date and one dictionary with key as Shape name and value as either weekday or weekend.