Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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# pleaseimage text in transcribed

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

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

Systems Analysis And Synthesis Bridging Computer Science And Information Technology

Authors: Barry Dwyer

1st Edition

0128054492, 9780128054499

More Books

Students also viewed these Databases questions

Question

Would it be easy for you to be a servant leader? Why?

Answered: 1 week ago