Question: help me do 4and 5 SECTION 2 - Creational (Factory) Patterns & Principles 4. List and describe (1-2 sentences each) three of the design approaches
SECTION 2 - Creational (Factory) Patterns & Principles 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. out you a a c. Get via injection, If we don't have skills on making clothes and we are money, we can ask someone to buy a shirt and give 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 od 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
Get step-by-step solutions from verified subject matter experts
