Question: answer these question SECTION 2 - Creational (Factory) Patterns & Principles (10) 4. List and describe (1-2 sentences each) three of the design approaches we

answer these question answer these question SECTION 2 - Creational (Factory) Patterns & Principles (10)

SECTION 2 - Creational (Factory) Patterns & Principles (10) 4. List and describe (1-2 sentences each) three of the design approaches we discussed for constructing, or creating, Java objects. (Hint: think shirts) (6 points) a. make it yourself. ... For example, we need a pretty cool shirt to go to a party, We want the shirt to be unique and perfect fit, we can make one by ourself. b. Use of factory. We still need a pretty cool shirt to go to a party, but we have skills on making clothes, we can use of factory visit son Stores to find out a shirt that we like. are give out . you a c. Get via injection, If we don't have skills on making clothes and we money, we can ask someone to buy a shirt and 5. Draw and explain what is the Dependency Inversion Principle (DIP)? How does the use of Factory patterns support it? Be specific in your answers. (4 points) The Dependency Inversion principle, high level classes are a directly with low level classes, they are using interface as an ab The Factory patterns support the DIP because the purpose o patterns is to expose a me that for creating objects, allowing su m the actual creation process

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!