problema what shows a pattern a patternb which


Problem:

(a) What shows a Pattern a Pattern?

(b) Which pattern is given below? Justify your answer.

public class A
{
private static A instance = null;
private A()
{
}
public static A Createinstance()
{
if (instance == null)
instance = new A();
return instance;
}
}

(c) Suppose that you need to write some program that needs to represent a building as rooms that can be manipulated. Manipulated as in interacting with objects in the room to change their state. The client that has ordered this program has determined that there will only be a need for a finite number of objects possible in each room, and a finite number of operations that can be performed on each of
them. A sample action for a room is to "prepare it for a presentation". You have decided to use a design pattern which will deal with a large number of classes, but does not really need to bother the programmer with interacting with each of them when a room needs to be prepared. What pattern is most suitable for the situation given above? Justify your answer. Draw a diagram to illustrate the design pattern.

(d) People want to know patterns. What could their attitude be about patterns? How can people use patterns to do a better job? What is the real value?

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: problema what shows a pattern a patternb which
Reference No:- TGS0361392

Expected delivery within 24 Hours