Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

Total Marks: 20
Due Date: 21/01/2017
To learn and understand the basic concepts of Design Patterns.
Please read the following instructions carefully before solving & submitting assignment:
Assignment should be in your own wordings not copied from net, handouts or books.
It should be clear that your assignment will not get any credit (zero marks) if:
o The assignment is submitted after due date.
o The submitted assignment does not open or file corrupt.
o The assignment is copied (from other student or copy from handouts or internet).
For any query about the assignment, please communicate at
You are advised to please upload the assignment in MS Word format only (other formats i.e.
.pdf, images etc. will not be accepted.)

Question No 1: 10 Marks
According to Roger S Pressman Software architecture alludes to “the overall structure of the software
and the ways in which that structure provides conceptual integrity for a system” .In its simplest form,
architecture is the structure or organization of program components (modules), the manner in which
these components interact, and the structure of data that are used by the components. In a broader
sense, however, components can be generalized to represent major system elements and their
interactions. One goal of software design is to derive an architectural rendering of a system. This
rendering serves as a framework from which more detailed design activities are conducted. A set of
architectural patterns enables a software engineer to solve common design problems.
What makes software architecture “BAD” Are architectures influenced by background and
experience of software architects? Explain. ?
(Answer should be brief i.e, 2-3 paragraphs)

Question No 2 :
In software engineering, the singleton pattern is a software design pattern that restricts
the instantiation of a class to one object. The Singleton pattern ensures that a class has only one
instance and provides a global point of access to that instance. The concept is sometimes generalized
to systems that operate more efficiently when only one object exists. Keep in mind the details and
working of singleton patterns solves the question no 2.
10 Marks

Views: 4868


Replies to This Discussion

This link is helpful for the 2nd question.

Singleton Design Pattern

Singleton Pattern Example
The Singleton class is declared as
class Singleton {
static Singleton* Instance();
static Singleton* _instance;
The corresponding implementation is
Singleton* Singleton::_instance = 0;
Singleton* Singleton::Instance(){
if (_instance == 0) {
_instance = new Singleton;
return _instance;

No doubt. All answer of 2nd question in this link. This link is very helpful.


© 2021   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service