Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the following code there are three patters used, one of them is the Singleton, please name the other two patterns and for each pattern

image text in transcribed

In the following code there are three patters used, one of them is the Singleton, please name the other two patterns and for each pattern mention the name of class and its role in that pattern public interface A{ public B al(); public interface B{ public class Bar public interface public void implements Foo { Foo { b1(Foo f); public void public void foo10% foo1(); } public void b2(); System.out.println(""); } } public class DA implements A{ private static DA variable1 = new DA(); private DAO) { } private static DA deadbeef1() { public class EB implements B{ private ArrayList list1 = new ArrayList(); public void b1(Foo f){ list1.add(f); } public void b20 { for (Foo f: list1) { return variable1; } public B a1() { return new EB(); } f.foo1(); } } } }

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

Modern Database Management

Authors: Fred R. McFadden, Jeffrey Slater, Mary B. Prescott

5th Edition

0805360549, 978-0805360547

More Books

Students also viewed these Databases questions