Design Pattern & Practices Interview Questions and Answers (103) - Page 5

Tell something about the Reliability Quality Attribute

- It comes under the category of Technical Quality Attributes.

- It is the ability of the system to perform consistently.

- Probability that the system will be able to perform in an expected pattern of use for a specified time frame.

- It is calculated by the formula : Number of successful executions / Total number of executions

- Higher successful executions result in high reliability

- It is measured during Testing Phase.
Tell something about the Security Quality Attribute

- It comes under the category of Technical Quality Attributes.

- It is the measure of the system’s ability to resist unauthorized usage while still providing its services to legitimate users.

- Security is also concerned with freedom from danger & safety.

- Security is to deal with confidentiality, integrity & availability

- It is calculated by the formula : (Number of attempts – Number of unauthorized accesses) / Total number of attempts
Tell something about the Maintainability Quality Attribute

- It comes under the category of Technical Quality Attributes.

- It is the ability of system to accommodate maintenance.

- A system is highly maintainable if it has high correctability, testability & expandability.

- Correctability : Effort for fixing defects -> should be low.

- Testability: Effort for testing -> should be minimum.

- Expandability : Effort for accommodating changes -> should be low
Tell something about the Re-usability Quality Attribute

- It comes under the category of Technical Quality Attributes.

- It is the ability to (re)use the components in other or future systems.

- It is calculated by the formula : Number of reuses / Total number of systems

- Higher value indicates high re-usability.
Tell something about the Cohesiveness Quality Attribute

- It comes under the category of Technical Quality Attributes.

- It is the togetherness within a class or module or interactions within a module.

- It is number of interactions between the methods of a class for various subsets of a use case

- Higher value indicates lack of togetherness within the class, means defects in class have impact on large number of functions of the system leading to poor robustness and maintainability.
Tell something about the Stability Quality Attribute

- It comes under the category of Technical Quality Attributes.

- It indicates how easy it is to change a module without impacting other modules within the application.

- Formula: Ce / (Ce + Ca)


Ca - afferent coupling, or incoming dependencies

Ce - efferent coupling, or outgoing dependencies

-As I approach to 1, the module is more stable and easier to change as only few other modules in the application use them
What is the major reason(s) for the usage of commercial-off-the-shelf (COTS) products?


a) Building large enterprise software systems becoming increasingly complex.

b) Various stake holders have different demands and expectations

c) Competition and need for business agility drives need for shorter time-to-market, lower cost, higher quality, etc.

To reduce the complexity of the above problems and to address stake holders concerns, organizations are making greater use of commercial-off-the-shelf (COTS) products in building large enterprise systems
What are some of the reasons that influence analysis for the Buy decision (go for “COTS”) ?

A Buy decision (go for “COTS”) generally occurs in large enterprise systems. This analysis is done in the initial stage of the project.

Some considerations that influence the analysis are:

• Go-to-market time
• Cost to build in-house
• Skills available
• Suitable COTS availability
• Integration requirements and the COTS integration capabilities
Why a interface mismatch happens OR What hinder the components to work correctly together?

Components make some assumptions about the environment in which they operate.
These assumptions may be about:

•Resource requirements

•Dependent libraries

•Availability of API

•Communication protocol to be used

•Or some other information for the component to work correctly

The differences in their assumptions may hinder the components to work correctly together
How to identify Interface Mismatch?

a) Listing out and matching requires assumptions and matching with existing system

b) Another way of discovering mismatches is by implementing prototype integration of candidate components. This way we can detect implicit and subtle assumptions which may not be foreseen otherwise.
What are the categories of Interface mismatch?

Interface mismatch can take two forms:

a) Service providing components make assumptions about their clients or users (referred to as requires assumptions)

b) Service requesting clients or users make assumptions about their service providers (provides assumptions)
Suggest some actions to be taken when a interface mismatch got identified

There are three things we can do about interface mismatch

a) Avoid it by carefully specifying and inspecting the components for your system

b) Detect those cases you have not avoided by careful qualification of the components.

c) Repair those cases you have detected by adapting the components
Suggest some methods of overcoming Interface mismatch


In this technique the component to be repaired is encapsulated (or wrapped) into an alternative abstraction. Clients access the wrapped component services only through an alternative interface provided by the wrapper.


A bridge translates some requires assumptions one component into some provides assumptions of another


Mediators exhibit properties of both bridges and wrappers. The major distinction between bridges and mediators, however, is that mediators incorporate a planning function that in effect results in run-time determination of the translation.
What is software architecture?

Software architecture is the set of significant decisions about the organization of a software system. It encompasses the following:

- Selection of the structural elements and their interfaces of a system

- Behavior as specified in collaborations among those elements

- Composition of structural and behavioral elements into larger subsystems

- Architectural style that guides this organization

- Functionality, usability, resilience, performance, reuse, comprehensibility, economic and technology constraints, tradeoffs and aesthetic concerns
What is a design Pattern?

A design pattern is a core of a solution that has been applied successfully in multiple environments to solve a problem that recurs in a specific set of situations. It is an effective means to convey/communicate what has been learned about high-quality designs. The result is:

– A shared language for communicating the experience gained in dealing
with these recurring problems and their solutions.

– A common vocabulary of system design elements for problem solving
discussions. A means of reusing and building upon the acquired insight
resulting in an improvement in the software quality in terms of its
maintainability and re-usability.
Explain how do you differentiate between design pattern and framework ?

A design pattern differs from a framework in a number of ways.Some of them are listed here -

a) Design patterns are recurring solutions to problems that arise during the life of a
software application in a particular context.

A framework is a group of components that cooperate with each other to provide a reusable architecture for applications with a given domain.

b) Patterns are logical in nature.

Frameworks are more physical in nature, as they exist in the form of some software.

c) Pattern descriptions are usually language agnostic.

Because frameworks exist in the form of some software, they are implementation-specific.

d) Patterns are more generic in nature and can be used in almost any kind of

Frameworks provide domain-specific functionality.
What is SLAB ?

Semantic Logging Application Block (SLAB) is modern logging framework which you can think as stepping-stone from traditional logging framework (log4Net or logging application block) which produce mainly unstructured data.

SLAB enable use use the EventSource class (.Net framework 4.5) and semantic log messages in your applications without moving away from the log formats you are familiar with (such as flat files,databases etc)

It can work in-process or out-of-process: you can host the event listeners your LOB application process or in a separate logging process. Either way you can use the same event listeners and formatters.
What is Factory Design Pattern?

Factory pattern comes under the category of Creational Pattern that promises the best way to create objects.
If we need the creation of many different types of objects when all derived from a common base type, Factory Pattern is the choice. Factory pattern does this by the help of Factory Method.It defines a method for creation of objects to sub classes.This means that a base class(abstract class) or interface is defined and subclasses which implement the interface / abstract class , are left to object instantiation. However, client code doesn't create an object against this interface. At run time, the Factory Method accepts a desired object as a parameter and returns a base class pointer to a new instance of that object.This pattern works best when a well-designed interface is used for the base class, so there is no need to cast the returned object.
What purpose does the Abstract Factory Pattern serves?

Abstract Factory Design Pattern exposes an interface for creating families of related or dependent objects . It does so by providing multiple factory methods .
Difference between Factory and Abstract Factory Pattern?

a) Abstract Factory can be use while we need to produce multiple factories (for producing multiple items) which it does through multiple factory methods via composition whereas in case of factory pattern, the object creation happens through a single factory method for only one single item.

b) Another difference that we can say is that, in the case of Factory the object creation happens directly through the class instance of the factory (we can use DP but again underlying the same stuff) as opposed to the Abstract Factory where it happens through interface
Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Interview Questions and Answers Categories