Professional Documents
Culture Documents
There are eight questions in this assignment which carries 80 marks. Rest 20
marks are for viva-voce. Answer all the questions. Please go through the
guidelines regarding assignments given in the Program Guide for the format
of presentation.
Question 1:
Object-oriented analysis
Object-oriented analysis (OOA) looks at the problem domain, with the aim of
producing a conceptual model of the information that exists in the area being
analyzed. Analysis models do not consider any implementation constraints
that might exist, such as concurrency, distribution, persistence, or how the
system is to be built. Implementation constraints are dealt with during object-
oriented design (OOD). Analysis is done before the Design[citation needed].
Object-oriented design
The concepts in the analysis model are mapped onto implementation classes
and interfaces. The result is a model of the solution domain, a detailed
description of how the system is to be built.
Question 2:
Question 3:
Question 4:
What is an object? Critically explain “Object Identification is one of the major
challenges in OOAD “.
(10 Marks)
ANSWER:In object-oriented programming (OOP), an instance of a program
(i.e. a program running in a computer) is treated as a dynamic set of
interacting objects. Objects in OOP extend the more general notion of objects
described above to include a very specific kind of typing, which among other
things allows for:
1. data members that represent the data associated with the object.
2. methods that access the data members in predefined ways.
In the case of most objects, the data members can only be accessed through
the methods, making it easy to guarantee that the data will always remain in
a well-defined state (class invariants will be enforced). Some languages do
not make distinctions between data members and methods.
* Singleton object: An object that is the only instance of its class during the
lifetime of the program.
* Functor (function object): an object with a single method (in C++, this
method would be the function operator, "operator()") that acts much like a
function (like a C/C++ pointer to a function).
* Immutable object: an object set up with a fixed state at creation time and
which does not vary afterward.
* First-class object: an object that can be used without restriction.
* Container: an object that can contain other objects.
* Factory object: an object whose purpose is to create other objects.
* Metaobject: an object from which other objects can be created (Compare
with class, which is not necessarily an object)
* Prototype: a specialized metaobject from which other objects can be
created by copying
* God object: an object that knows too much or does too much. The God
object is an example of an anti-pattern.
* Antiobjects: a computational metaphor useful to conceptualize and solve
hard problems often with massively parallel approaches by swapping
computational foreground and background.....
Filter object
All objects have identity and are distinguishable. Two apples with the same
color, shape and texture are still individual apples; a person can eat one and
then eat the other.
An object class describes group with similar properties, common behavior,
common relationships to other objects, and common semantics, company,
animal, process, and window are all object classes. Ach person has an age,
IQ, and may work at a job. Ac process has an owner, priority, and list of
required resources. Objects and object classes often appear as nouns in
problem description.
The object in class share a common semantic purpose, above and beyond the
requirement of common attributes and behavior. Each object knows its class.
Question 5:
What is a state diagram? Explain the characteristics of the system that can
be identified by examination of the state diagram of that System. (10 Marks)
Ans. State diagrams (also called State Chart diagram) are used to help the
developer better understand any complex/unusual functionalities or business
flows of specialized areas of the system. In short, State diagrams depict the
dynamic behavior of the entire system, or a sub-system, or even a single
object in a system. This is done with help of Behavioral elements.
Initial state: This shows the starting point or first activity of the flow. Denoted
by a solid circle. This is also called as a “pseudo state,” where the state has
no variables describing it further and no activities.
State: Represents the state of object at an instant of time. In a state diagram,
there will be multiple of such symbols, one for each state of the Object we are
discussing. Denoted by a rectangle with rounded corners and compartments
(such as a class with rounded corners to denote an Object).
Transition: An arrow indicating the Object to transition from one state to the
other. The actual trigger event and action causing the transition are written
beside the arrow, separated by a slash. Transition that occur because the
state completed and activity are called “triggerless” transitions. If an event
has to occur after the completion of some event or action, the event or action
is called the guard condition. The transition takes place after the guard
condition. The transition takes place after the guard condition occurs. This
guard condition/event/action is depicted by square brackets around the
description of the event/action.
History States: A flow may require that the object go to occur is called as an
event or action. Every transition need not occur due to the occurrence of an
event or action directly related to the state that transitioned from one state
to another.
Final State: the end of the state diagram is shown by a bull’s eye symbol also
called a final state. A final state is another example of a pseudo state
because it does not have any variable or action described.
Simple Set
A simple state is a state that does not have substates, i.e. it has no regions
and it has no submachine state machine.
Question 6 :
Explain different UML Diagrams used in OOAD. (10 Marks)
Component diagram
Deployment diagram
Object diagram
Package diagram
Since structure diagrams represent the structure of a system, they are used
extensively in documenting the architecture of software systems.
Behavior diagrams
Behavior diagrams emphasize what must happen in the system being
modeled:
Activity diagram: represents the business and operational step-by-step
workflows of components in a system. An activity diagram shows the overall
flow of control.
State diagram: standardized notation to describe many systems, from
computer programs to business processes.
Use case diagram: shows the functionality provided by a system in terms of
actors, their goals represented as use cases, and any dependencies among
those use cases.
Communication diagram
Interaction overview diagram
Sequence diagram
Question 7:
Explain object model and dynamic model with example. (10 Marks)
Ans: The object model describes the structure of the objects in the system –
their identity, their relationship to other objects, their attributes, and their
operations. The object model depicts the primary view of how the real world
in which the system interacts is divided and the overall decomposition of the
system. The object model provides the framework into which the other
models are placed.
The object class diagram should adhere to OMT’s notation and exploit the
capabilities of OMT, such as links and vasodilatations, inheritance
(generalization and specialization), and aggregation. The attributes and
operations need not be included in this diagram, as they will be described
below in the object class specification.
Classes
An object class describes group with similar properties, common behavior,
common relationships to other objects, and common semantics, company,
animal, process, and window are all object classes. Ach person has an age,
IQ, and may work at a job. Ac process has an owner, priority, and list of
required resources. Objects and object classes often appear as nouns in
problem description.
The object in class share a common semantic purpose, above and beyond the
requirement of common attributes and behavior. Each object knows its class.
Question 8:
What is Unidirectional Implementation? Explain how it is different than Bi-
directional Implementation with an example. (10 Marks)