SOFTWARE ENGINEERING

SOFTWARE DESIGN

DESIGN PATTERNS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
A billing application needs to interface with an HR application in order to exchange employee data, however each has its own interface and implementation for the Employee object. In addition, the SSN is stored in different formats by each system. What pattern can we use to create a common interface between the two applications that allows them to communicate using their native objects and is able to transform the SSN format in the process?
A
Adapter
B
Bridge
C
Chain of Responsibility
D
Observer
Explanation: 

Detailed explanation-1: -1. Which mechanism is applied to use a design pattern in an OO system? Explanation: Using inheritance, an existing design pattern becomes a template for a new subclass.

Detailed explanation-2: -One example of Strategy pattern from JDK itself is a Collections. sort() method and Comparator interface, which is a strategy interface and defines strategy for comparing objects.

Detailed explanation-3: -Which of the following are not provided by design patterns but by microservices. Answer: Aggregator.

There is 1 question to complete.