Question: C# please 1. Consider the example in Assignment 1 (a canvas that can draw only circle and rectangle, disregarding Styles). Follow the Factory Method Pattern,

C# pleaseC# please 1. Consider the example in Assignment 1 (a canvas that

1. Consider the example in Assignment 1 (a canvas that can draw only circle and rectangle, disregarding Styles). Follow the Factory Method Pattern, draw a class diagram that include these classes: Shape, Circle, Rectangle, Canvas, as well as other classes necessary. Remember to include proper connections, and necessary attribute/method definitions in your class diagram. (10pts) 2. What is the role of the Canvas class in your design: is it part of the Factory Method Pattern, or is it something external to the pattern? Justify your reasoning. (5pts). 3. Write some necessary sketch code for the classes you defined in Q1, that is enough to demonstrate the process of "drawing a circle on a canvas". You may describe the details of methods/functions with comments (no need to write actual code). (10pts) 4. Describe a scenario where the Factory Method might become insufficient, and that Abstract Factory might be better, e.g. such as introducing new elements like the Styles of the Shapes. No need to write code or draw diagram. (5pts)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!