ASHWINI.B Siva Institute of Frontier Technology, Chennai
1
DEPARTMENT OF COMPUTER SCIENCE
CS2353
OBJECT ORIENTED ANALYSIS AND DESIGN
2 Marks (with answers)
ASHWINI.B Siva Institute of Frontier Technology, Chennai
2
Unit-I Introduction to OOAD
1. What is Object-Oriented Analysis and Design?
During object-oriented analysis there is an emphasis on finding and describing the objects or
concepts in the problem domain. During object-oriented design (or simply, object design)
there is an emphasis on defining software objects and how they collaborate to fulfil the
requirements. The combination of these two concepts shortly known as object oriented
analysis and design.
2. What is Object-Oriented Analysis?
During object-oriented analysis there is an emphasis on finding and describing the objects or
concepts in the problem domain. For example, in the case of the flight information system,
some of the concepts include Plane, Flight, and Pilot.
3. What is Object-Oriented Design?
During object-oriented design (or simply, object design) there is an emphasis on defining
software objects and how they collaborate to fulfil the requirements. The combination of
these two concepts shortly known as object oriented analysis and design.
4. What is Analysis and Design?
Analysis emphasizes an investigation of the problem and requirements, rather than a solution.
Design emphasizes a conceptual solution (in software and hardware) that fulfils the
requirements, rather than its implementation. For example, a description of a database
schema and software objects.
5. What is the UML?
The Unified Modelling Language is a visual language for specifying, constructing and
documenting the artifacts of systems.
6. What are the Types of UML Diagrams?
UML defines nine types of diagrams:
i. class (package) Diagrams
ii. use case diagram
iii. interaction diagram
a. sequence diagram
b. collaboration diagram
iv. state chart diagram
ASHWINI.B Siva Institute of Frontier Technology, Chennai
3
v. activity diagram
vi. Component diagram
vii. Deployment diagram
7. What are the united processes (UP) phases?
The Unified Process is a software development process or methodology that above all
promotes Iterative Development. The result of each iteration is an executable, but incomplete
system. The system may need much iteration before it is ready for production.
8. What is Inception?
Inception is the initial short step to establish a common vision and basic scope for the project.
Inception in one Sentence: Envision the product scope, vision, and business case.
9. Benefits of iterative development include:
 Early mitigation of high risks.
 Early visible progress.
 Early feedback, user engagement, and adaptation, leading to a system that more
nearly meets the needs of the various stakeholders.
 Managed complexity – no compounding of complexity by postponing the
implementation phase. Learning within iteration.
10. What are Use Case Diagrams?
A use case diagram is an excellent picture of the system context; it makes a good context
diagram that is, showing the boundary of a system, what lies outside of it, and how it gets
used. It serves as a communication tool that summarizes the behavior of a system and its
actors.
11. Define Use case.
 A use case is a pattern of behavior, the system exhibits.
 Each use case is a sequence of related transactions performed by an actor and the
system in dialogue.
 USE CASE is dialogue between an actor and the system.
 A use case must deliver something of value to an actor.
 The use cases may be decomposed into other use cases.
 Use cases also present a good vehicle for project planning.
ASHWINI.B Siva Institute of Frontier Technology, Chennai
4
12. What is an Actor?
 Actor: external entity interacts (behaviour) with system, such as a person (identified
by role), computer system, or organization; for example, a cashier.
 Three kind of Actors
 Primary actor has user goals fulfilled through using services. (e.g., the
cashier). Find user goals to drive the use cases.
 Supporting actor provides a service (e.g., the automated payment
authorization service is an example).Often a computer system, but could
be an organization or person. The purpose is to clarify external
interfaces and protocols.
 Offstage actor has an interest in the behavior of the use case, but is not
primary or supporting (e.g., a government tax agency).
13. What is a scenario?
A scenario is a specific sequence of actions and interactions between actors and the system; it
is also called a use case instance.
ASHWINI.B Siva Institute of Frontier Technology, Chennai
5
UNIT-II Elaboration
1. What is Elaboration?
Elaboration is the initial series of iterations during which the team does serious investigation,
Implements (programs and tests) the core architecture, clarifies most requirements, and
tackles the high-risk issues.
2. What are the tasks performed in elaboration?
The main two purposes of Elaboration are:
 Requirements analysis: Determining how functionality (described during
requirements capture) will operate however, the system is perceived as a black box. In
other words, we only consider how the system appears from outside (not inside)
 Architecture and Design: Determining how functionality will be implemented
The system is perceived as a white/clear.
3. Define Domain Model.
 Graphical model of basic domain concepts and their relationships.
 Nodes: Concepts.
 May have attributes - properties of concepts-classes.
 Edges: Relationships between concepts called ―associations.
 Drawn using the UML Class Diagrams.
4. How to Create a Domain Model?
The current iteration requirements under design:
 Find the conceptual classes (see a following guideline).
 Draw them as classes in a UML class diagram.
 Add associations and attributes.
5. What are Conceptual Classes?
The domain model illustrates conceptual classes or vocabulary in the domain. Informally, a
conceptual class is an idea, thing, or object. More formally, a conceptual class may be
considered in terms of its symbol, intension, and extension.
 Symbol words or images representing a conceptual class.
 Intension the definition of a conceptual class.
 Extension the set of examples.
ASHWINI.B Siva Institute of Frontier Technology, Chennai
6
6. Define ASSOCIATION.
 These are the most general type of relationship.
 It denotes a semantic connection between two classes.
 It shows BI directional connection between two classes.
 It is a weak coupling as associated classes remain somewhat independent of each
other.
7. What is mean by AGGREGATION?
This is a special type of association
 The association with label ―contains or ―is part of is an aggregation.
 It represents ―has a ― relationship.
 It is used when one object logically or physically contains other.
 The container is called as aggregate.
 It has a diamond at its end.
 The components of aggregate can be shared with others.
8. What is mean by COMPOSITION?
This is a strong form of aggregation-
 It expresses the stronger coupling between the classes.
 The owner is explicitly responsible for creation and deletion of the part.
 Any deletion of whole is considered to cascade its part.
 The aggregate has a filled diamond at its end.
9. Define Activity Diagrams.
Activity diagrams illustrate the dynamic nature of a system by modelling the flow of control
from activity to activity. An activity represents an operation on some class in the system that
results in a change in the state of the system. Typically, activity diagrams are used to model
workflow or business processes and internal operation.
ASHWINI.B Siva Institute of Frontier Technology, Chennai
7
Unit-III System Sequence Diagrams
1. What is sequence diagram?
 Typically these diagrams capture behaviours of the single scenario.
 Shows object interaction arranged in time sequence.
 They how sequence of messages among the objects.
 It has two dimensions-
 Vertical represents time.
 Horizontal represents objects.
2. What is meant by interaction diagram?
The term interaction diagram is a generalization of two more specialized UML diagram
types; both can be used to express similar message interactions:
 Collaboration diagrams.
 Sequence diagrams.
3. Define Package Diagrams.
Package diagrams are a subset of class diagrams, but developers sometimes treat them as a
separate technique. Package diagrams organize elements of a system into related groups to
minimize dependencies between packages.
4. What is mean by Class Diagrams?
Class diagrams are the backbone of almost every object oriented method, including UML.
They describe the static structure of a system. This illustrates the attributes and methods of
the classes.
5. List the relationships used in class diagram?
 Generalization(class to class)
 Association (object to object)
 Aggregation (object to object)
 Composition (object to object
6. What is Low coupling?
Coupling is a measure of how strongly one element is connected to, has knowledge of, or
relies on other elements. An element with low (or weak) coupling is not dependent on too
many other elements; "too many" is context-dependent, but will be examined.
ASHWINI.B Siva Institute of Frontier Technology, Chennai
8
7. How would you identify attributes?
 Attributes usually correspond to nouns followed by preposition phrases.
Attributes also may correspond to adjectives or adverbs.
 Keep the class simple; state only enough attributes to define the object state.
 Attributes are less likely to be fully described in the problem statement.
 Omit derived attributes. They should be expressed as a method.
 Do not carry excess identification.
ASHWINI.B Siva Institute of Frontier Technology, Chennai
9
Unit-IV GRASP
1. What is GRASP and Designing Objects with Responsibilities?
The following sections present the first five GRASP patterns:
 Information Expert
 Creator
 High Cohesion
 Low Coupling
 Controller
2. When is visibility necessary?
To send a message from one object to another, the receiver object must be visible to the
sender, so the sender has to have a pointer or reference to the receiver.
Example:
If A sends messages to B, which must be visible to which?
B is visible to A means A can send a message to B.
3. Define patterns.
A pattern is a named problem/solution pair that can be applied in new context, with advice on
how to apply it in novel situations and discussion of its trade-offs.
4. Define coupling.
The degree to which components depend on one another. There are two types of coupling,
"tight" and "loose". Loose coupling is desirable for good software engineering but tight
coupling may be necessary for maximum performance. Coupling is increased when the data
exchanged between components becomes larger or more complex.
5. Differentiate coupling and cohesion.
Coupling deals with interactions between objects or software components while cohesion
deals with the interactions within a single object or software component. Highly cohesive
components can lower coupling because only a minimum of essential information need to be
passed between components.
6. What do you mean by design patterns?
Design patterns are devices that allow systems to share knowledge about their design, by
describing commonly recurring structures of communicating components that solve a general
design problem within a particular context.
ASHWINI.B Siva Institute of Frontier Technology, Chennai
10
Unit-V UML state diagrams and modelling
1. What is UML state or state chart diagrams and modelling?
A state chart diagram (also called a state diagram) shows the sequence of states that an object
goes through during its life in response to outside stimuli and messages.
2. Define Events, States, and Transitions.
 An event is a significant or noteworthy occurrence.
For example: A telephone receiver is taken off the hook.
 A state is the condition of an object at a moment in time—the time between events.
For example: A telephone is in the state of being "idle" after the receiver is placed on
the hook and until it Is taken off the hook.
 A transition is a relationship between two states that indicates that when an event
occurs, the Object moves from the prior state to the subsequent state.
For example: When the event "off hook" occurs, transition the telephone from the
"idle" to "active" state.
3. Define post condition.
The post conditions describe changes in the state of objects in the Domain Model. Domain
Model state changes include instances created, associations formed or broken, and attributes
changed.
4. When Are Contracts Useful?
The use cases are the main repository of requirements for the project. They may provide most
oral of the detail necessary to know what to do in the design, in which case, contracts are not
helpful. However, there are situations where the details and complexity of required state
changes are awkward to capture in use cases.
5. Mention the Guidelines for Contracts.
To make contracts:
 Identify system operations from the SSDs.
 For system operations that are complex and perhaps subtle in their results, or which
are not clear in the use case, construct a contract.
 To describe the post conditions, use the following categories:
 Instance creation and deletion.
 attribute modification.
 Associations formed and broken.
ASHWINI.B Siva Institute of Frontier Technology, Chennai
11
6. Define Component diagrams.
 A component represents a modular part of a system that encapsulates its contents
and whose manifestation is replaceable within its environment.
 A component defines its behavior in terms of provided and required interfaces. As
such, a component serves as a type, whose conformance is defined by these provided
and required interfaces.
7. What are Deployment diagrams?
A deployment diagram shows the assignment of concrete software artifacts (such as
executable files) to computational nodes (something with processing services). It shows the
deployment of software elements to the physical architecture and the communication between
physical elements.

Ooad 2marks

  • 1.
    ASHWINI.B Siva Instituteof Frontier Technology, Chennai 1 DEPARTMENT OF COMPUTER SCIENCE CS2353 OBJECT ORIENTED ANALYSIS AND DESIGN 2 Marks (with answers)
  • 2.
    ASHWINI.B Siva Instituteof Frontier Technology, Chennai 2 Unit-I Introduction to OOAD 1. What is Object-Oriented Analysis and Design? During object-oriented analysis there is an emphasis on finding and describing the objects or concepts in the problem domain. During object-oriented design (or simply, object design) there is an emphasis on defining software objects and how they collaborate to fulfil the requirements. The combination of these two concepts shortly known as object oriented analysis and design. 2. What is Object-Oriented Analysis? During object-oriented analysis there is an emphasis on finding and describing the objects or concepts in the problem domain. For example, in the case of the flight information system, some of the concepts include Plane, Flight, and Pilot. 3. What is Object-Oriented Design? During object-oriented design (or simply, object design) there is an emphasis on defining software objects and how they collaborate to fulfil the requirements. The combination of these two concepts shortly known as object oriented analysis and design. 4. What is Analysis and Design? Analysis emphasizes an investigation of the problem and requirements, rather than a solution. Design emphasizes a conceptual solution (in software and hardware) that fulfils the requirements, rather than its implementation. For example, a description of a database schema and software objects. 5. What is the UML? The Unified Modelling Language is a visual language for specifying, constructing and documenting the artifacts of systems. 6. What are the Types of UML Diagrams? UML defines nine types of diagrams: i. class (package) Diagrams ii. use case diagram iii. interaction diagram a. sequence diagram b. collaboration diagram iv. state chart diagram
  • 3.
    ASHWINI.B Siva Instituteof Frontier Technology, Chennai 3 v. activity diagram vi. Component diagram vii. Deployment diagram 7. What are the united processes (UP) phases? The Unified Process is a software development process or methodology that above all promotes Iterative Development. The result of each iteration is an executable, but incomplete system. The system may need much iteration before it is ready for production. 8. What is Inception? Inception is the initial short step to establish a common vision and basic scope for the project. Inception in one Sentence: Envision the product scope, vision, and business case. 9. Benefits of iterative development include:  Early mitigation of high risks.  Early visible progress.  Early feedback, user engagement, and adaptation, leading to a system that more nearly meets the needs of the various stakeholders.  Managed complexity – no compounding of complexity by postponing the implementation phase. Learning within iteration. 10. What are Use Case Diagrams? A use case diagram is an excellent picture of the system context; it makes a good context diagram that is, showing the boundary of a system, what lies outside of it, and how it gets used. It serves as a communication tool that summarizes the behavior of a system and its actors. 11. Define Use case.  A use case is a pattern of behavior, the system exhibits.  Each use case is a sequence of related transactions performed by an actor and the system in dialogue.  USE CASE is dialogue between an actor and the system.  A use case must deliver something of value to an actor.  The use cases may be decomposed into other use cases.  Use cases also present a good vehicle for project planning.
  • 4.
    ASHWINI.B Siva Instituteof Frontier Technology, Chennai 4 12. What is an Actor?  Actor: external entity interacts (behaviour) with system, such as a person (identified by role), computer system, or organization; for example, a cashier.  Three kind of Actors  Primary actor has user goals fulfilled through using services. (e.g., the cashier). Find user goals to drive the use cases.  Supporting actor provides a service (e.g., the automated payment authorization service is an example).Often a computer system, but could be an organization or person. The purpose is to clarify external interfaces and protocols.  Offstage actor has an interest in the behavior of the use case, but is not primary or supporting (e.g., a government tax agency). 13. What is a scenario? A scenario is a specific sequence of actions and interactions between actors and the system; it is also called a use case instance.
  • 5.
    ASHWINI.B Siva Instituteof Frontier Technology, Chennai 5 UNIT-II Elaboration 1. What is Elaboration? Elaboration is the initial series of iterations during which the team does serious investigation, Implements (programs and tests) the core architecture, clarifies most requirements, and tackles the high-risk issues. 2. What are the tasks performed in elaboration? The main two purposes of Elaboration are:  Requirements analysis: Determining how functionality (described during requirements capture) will operate however, the system is perceived as a black box. In other words, we only consider how the system appears from outside (not inside)  Architecture and Design: Determining how functionality will be implemented The system is perceived as a white/clear. 3. Define Domain Model.  Graphical model of basic domain concepts and their relationships.  Nodes: Concepts.  May have attributes - properties of concepts-classes.  Edges: Relationships between concepts called ―associations.  Drawn using the UML Class Diagrams. 4. How to Create a Domain Model? The current iteration requirements under design:  Find the conceptual classes (see a following guideline).  Draw them as classes in a UML class diagram.  Add associations and attributes. 5. What are Conceptual Classes? The domain model illustrates conceptual classes or vocabulary in the domain. Informally, a conceptual class is an idea, thing, or object. More formally, a conceptual class may be considered in terms of its symbol, intension, and extension.  Symbol words or images representing a conceptual class.  Intension the definition of a conceptual class.  Extension the set of examples.
  • 6.
    ASHWINI.B Siva Instituteof Frontier Technology, Chennai 6 6. Define ASSOCIATION.  These are the most general type of relationship.  It denotes a semantic connection between two classes.  It shows BI directional connection between two classes.  It is a weak coupling as associated classes remain somewhat independent of each other. 7. What is mean by AGGREGATION? This is a special type of association  The association with label ―contains or ―is part of is an aggregation.  It represents ―has a ― relationship.  It is used when one object logically or physically contains other.  The container is called as aggregate.  It has a diamond at its end.  The components of aggregate can be shared with others. 8. What is mean by COMPOSITION? This is a strong form of aggregation-  It expresses the stronger coupling between the classes.  The owner is explicitly responsible for creation and deletion of the part.  Any deletion of whole is considered to cascade its part.  The aggregate has a filled diamond at its end. 9. Define Activity Diagrams. Activity diagrams illustrate the dynamic nature of a system by modelling the flow of control from activity to activity. An activity represents an operation on some class in the system that results in a change in the state of the system. Typically, activity diagrams are used to model workflow or business processes and internal operation.
  • 7.
    ASHWINI.B Siva Instituteof Frontier Technology, Chennai 7 Unit-III System Sequence Diagrams 1. What is sequence diagram?  Typically these diagrams capture behaviours of the single scenario.  Shows object interaction arranged in time sequence.  They how sequence of messages among the objects.  It has two dimensions-  Vertical represents time.  Horizontal represents objects. 2. What is meant by interaction diagram? The term interaction diagram is a generalization of two more specialized UML diagram types; both can be used to express similar message interactions:  Collaboration diagrams.  Sequence diagrams. 3. Define Package Diagrams. Package diagrams are a subset of class diagrams, but developers sometimes treat them as a separate technique. Package diagrams organize elements of a system into related groups to minimize dependencies between packages. 4. What is mean by Class Diagrams? Class diagrams are the backbone of almost every object oriented method, including UML. They describe the static structure of a system. This illustrates the attributes and methods of the classes. 5. List the relationships used in class diagram?  Generalization(class to class)  Association (object to object)  Aggregation (object to object)  Composition (object to object 6. What is Low coupling? Coupling is a measure of how strongly one element is connected to, has knowledge of, or relies on other elements. An element with low (or weak) coupling is not dependent on too many other elements; "too many" is context-dependent, but will be examined.
  • 8.
    ASHWINI.B Siva Instituteof Frontier Technology, Chennai 8 7. How would you identify attributes?  Attributes usually correspond to nouns followed by preposition phrases. Attributes also may correspond to adjectives or adverbs.  Keep the class simple; state only enough attributes to define the object state.  Attributes are less likely to be fully described in the problem statement.  Omit derived attributes. They should be expressed as a method.  Do not carry excess identification.
  • 9.
    ASHWINI.B Siva Instituteof Frontier Technology, Chennai 9 Unit-IV GRASP 1. What is GRASP and Designing Objects with Responsibilities? The following sections present the first five GRASP patterns:  Information Expert  Creator  High Cohesion  Low Coupling  Controller 2. When is visibility necessary? To send a message from one object to another, the receiver object must be visible to the sender, so the sender has to have a pointer or reference to the receiver. Example: If A sends messages to B, which must be visible to which? B is visible to A means A can send a message to B. 3. Define patterns. A pattern is a named problem/solution pair that can be applied in new context, with advice on how to apply it in novel situations and discussion of its trade-offs. 4. Define coupling. The degree to which components depend on one another. There are two types of coupling, "tight" and "loose". Loose coupling is desirable for good software engineering but tight coupling may be necessary for maximum performance. Coupling is increased when the data exchanged between components becomes larger or more complex. 5. Differentiate coupling and cohesion. Coupling deals with interactions between objects or software components while cohesion deals with the interactions within a single object or software component. Highly cohesive components can lower coupling because only a minimum of essential information need to be passed between components. 6. What do you mean by design patterns? Design patterns are devices that allow systems to share knowledge about their design, by describing commonly recurring structures of communicating components that solve a general design problem within a particular context.
  • 10.
    ASHWINI.B Siva Instituteof Frontier Technology, Chennai 10 Unit-V UML state diagrams and modelling 1. What is UML state or state chart diagrams and modelling? A state chart diagram (also called a state diagram) shows the sequence of states that an object goes through during its life in response to outside stimuli and messages. 2. Define Events, States, and Transitions.  An event is a significant or noteworthy occurrence. For example: A telephone receiver is taken off the hook.  A state is the condition of an object at a moment in time—the time between events. For example: A telephone is in the state of being "idle" after the receiver is placed on the hook and until it Is taken off the hook.  A transition is a relationship between two states that indicates that when an event occurs, the Object moves from the prior state to the subsequent state. For example: When the event "off hook" occurs, transition the telephone from the "idle" to "active" state. 3. Define post condition. The post conditions describe changes in the state of objects in the Domain Model. Domain Model state changes include instances created, associations formed or broken, and attributes changed. 4. When Are Contracts Useful? The use cases are the main repository of requirements for the project. They may provide most oral of the detail necessary to know what to do in the design, in which case, contracts are not helpful. However, there are situations where the details and complexity of required state changes are awkward to capture in use cases. 5. Mention the Guidelines for Contracts. To make contracts:  Identify system operations from the SSDs.  For system operations that are complex and perhaps subtle in their results, or which are not clear in the use case, construct a contract.  To describe the post conditions, use the following categories:  Instance creation and deletion.  attribute modification.  Associations formed and broken.
  • 11.
    ASHWINI.B Siva Instituteof Frontier Technology, Chennai 11 6. Define Component diagrams.  A component represents a modular part of a system that encapsulates its contents and whose manifestation is replaceable within its environment.  A component defines its behavior in terms of provided and required interfaces. As such, a component serves as a type, whose conformance is defined by these provided and required interfaces. 7. What are Deployment diagrams? A deployment diagram shows the assignment of concrete software artifacts (such as executable files) to computational nodes (something with processing services). It shows the deployment of software elements to the physical architecture and the communication between physical elements.