0% found this document useful (0 votes)
147 views21 pages

III Ooad

Object-oriented analysis and design (OOAD) is a technical approach that applies object-oriented programming concepts like classes, objects, inheritance etc. to analyze and design an application. The purpose of OOAD is to identify objects and their relationships to model a system independently of implementation. The main tasks in OOAD include finding objects, organizing them, describing their interactions, and defining their behaviors and internals. The Unified Modeling Language (UML) is used for OOAD to visually model a system.

Uploaded by

sairam kamalay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
147 views21 pages

III Ooad

Object-oriented analysis and design (OOAD) is a technical approach that applies object-oriented programming concepts like classes, objects, inheritance etc. to analyze and design an application. The purpose of OOAD is to identify objects and their relationships to model a system independently of implementation. The main tasks in OOAD include finding objects, organizing them, describing their interactions, and defining their behaviors and internals. The Unified Modeling Language (UML) is used for OOAD to visually model a system.

Uploaded by

sairam kamalay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 21

UNIT-I

1. What is Object-oriented analysis and design?


Object-oriented analysis and design (OOAD) is a popular technical approach for analyzing and
designing an application, system, or business by applying the object-oriented programming, as well as using
visual modeling throughout the development life cycles to foster better stakeholder communication and
product quality.
2. The Purpose of analysis and difference between object oriented analysis and other forms?
The purpose of any analysis activity in the software life-cycle is to create a model of the system's
functional requirements that is independent of implementation constraints.
The main difference between object-oriented analysis and other forms of analysis is that by the object-
oriented approach we organize requirements around objects, which integrate both behaviors (processes) and
states (data) modeled after real world objects that the system interacts with. In other or traditional analysis
methodologies, the two aspects: processes and data are considered separately. For example, data may be
modeled by ER diagrams, and behaviors by flow charts or structure charts.
3. Write the purpose of OO analysis and design can described as:
Identifying the objects of a system.
Identifying their relationships.
Making a design, which can be converted to executables using OO languages.
4. Write the primary tasks in object-oriented analysis (OOA):
Find the objects
Organize the objects
Describe how the objects interact
Define the behavior of the objects
Define the internals of the objects
5. What is UML?
The Unified Modeling Language (UML) is a general-purpose, development, modeling language in
the field of software engineering, that is intended to provide a standard way to visualize the design of a
system.

6. What is an actor in use case?


An actor in the Unified Modeling Language (UML) "specifies a role played by a user or any other
system that interacts with the subject." "An Actor model a type of role played by an entity that interacts with
the subject (e.g., by exchanging signals and data), but which is external to the subject."
7. Short Notes on Relationship?
Relationship is another most important building block of UML. It shows how the elements are
associated with each other and this association describes the functionality of an application.
There are four kinds of relationships available.

Dependency
Dependency is a relationship between two things in which change in one element also affects the
other.

Association
Association is basically a set of links that connects the elements of a UML
model. It also describes how many objects are taking part in that relationship.

Generalization
Generalization can be defined as a relationship which connects a specialized element with a
generalized element. It basically describes the inheritance relationship in the world of objects

Realization
Realization can be defined as a relationship in which two
elements are connected. One element describes some responsibility, which is not implemented
and the other one implements them. This relationship exists in case of interfaces.

8. How do you identify actors in use case diagrams?


To identify use cases we will take the following steps:
Step 1: Identify candidate system actors.
Step 2: Identify the goals of the actors.
Step 3: Identify the candidate use cases.
Step 4: Identify the start point for each use case.
Step 5: Identify the end point for each use case.
Step 6: Refine and scope units of interaction.

9. What is the use of use case diagram?


A use case diagram is a graphic depiction of the interactions among the elements of a system. A use case is a
methodology used in system analysis to identify, clarify, and organize system requirements. The use cases, which the
specific roles are played by the actors within and around the system.

10. Write the Benefits of Use Cases


Relatively easy to write and easy to read
Comprehensible by users
Engage the users in the requirements process
Force developers to think through the design of a system from a user viewpoint
Identify a context for the requirements of the system
Critical tool in the design, implementation, analysis and testing process
Rapid change allows exploratory approach
Serve as inputs to the user documentation

11. Mention the Strength and Weakness of the Use case Diagram.
Strengths
Capture different actors views of the system
Capture some structures in requirements
Are comprehensible by natve users
Weaknesses
Lack of non-functional requirements
Lack of what the system shall not do

12. What is Class Diagram? When to use Class Diagrams?
Class diagram is a static diagram. It represents the static view of an application. Class diagram is not
only used for visualizing, describing, and documenting different aspects of a system but also for constructing
executable code of the software application.
Class diagram describes the attributes and operations of a class and also the constraints imposed on
the system. The class diagrams are widely used in the modeling of objectoriented systems because they are
the only UML diagrams, which can be mapped directly with object-oriented languages.
Class diagram shows a collection of classes, interfaces, associations, collaborations, and constraints.
It is also known as a structural diagram.

13. Purpose of Class Diagrams


Analysis and design of the static view of an application.
Describe responsibilities of a system.
Base for component and deployment diagrams.
Forward and reverse engineering.

14. What is aggregation and composition?


Aggregation
A special form of association that specifies a whole-part relationship between the aggregate (whole)
and a component part.
Composition
A form of aggregation with strong ownership and coincident lifetime as part of the whole. Parts with
non-fixed multiplicity may be created after the composite itself, but once created they live and die with it
(i.e., they share lifetimes). Such parts can also be explicitly removed before the death of the composite.
Composition may be recursive.
15. Write the benefits of iterative Development.
early rather than late mitigation of high risks (technical, requirements,objectives, usability, and so
forth)
1. early visible progress
early feedback, user engagement, and adaptation, leading to a refined sys-tem that more
closely meets the real needs of the stakeholders
managed complexity; the team is not overwhelmed by analysis paralysis or very long and
complex steps
the learning within an iteration can be methodically used to improve the development process itself,
iteration by iteration

16. History of UML


1980 1990 Many different methodologies
Booch method by Grady Booch
Object Modeling Technique (OMT) by Jim Rumbaugh
Object Oriented Software Engineering (OOSE) by Ivar Jacobson
Each method had its strengths & weaknesses.
Booch was great in design
OMT & OOSE were great in analysis

17. Write the Purpose of Class Diagrams


Analysis and design of the static view of an application.
Describe responsibilities of a system.
Base for component and deployment diagrams.
Forward and reverse engineering.

18. Purpose of Object Diagrams


Forward and reverse engineering
Object relationships of a system
Static view of an interaction
Understand object behavior and their relationship from a practical perspective

19. Purpose of Component Diagrams


Visualize the components of a system.
Construct executables by using forward and reverse engineering.
Describe the organization and relationships of the components.

20. Purpose of Deployment Diagrams


Visualize the hardware topology of a system.
Describe the hardware components used to deploy software components.
Describe the runtime processing nodes.

21. Purpose of Use Case Diagrams


Used to gather the requirements of a system.
Used to get an outside view of a system.
Identify the external and internal factors influencing the system.
Show the interaction among the requirements are actors.

22. Purpose of Interaction Diagrams


To capture the dynamic behavior of a system.
To describe the message flow in the system.
To describe the structural organization of the objects.
To describe interaction among objects.

23. Purpose of Statechart Diagrams


To model the dynamic aspect of a system.
To model the lifetime of a reactive system.
To describe different states of an object during its lifetime.
Define a state machine to model the states of an object.

24. Purpose of Activity Diagrams


Draw the activity flow of a system.
Describe the sequence from one activity to another.
Describe the parallel, branched, and concurrent flow of the system.

UNIT -I1
1. Define pattern and design pattern.
Pattern can be defined as a named, and well known problem solution pair, which can be applied in
new context, and guides on how to apply it in current situations and discussion of its trade-offs,
implementation, variations and so on.

Design Pattern: The common software problem and the corresponding solutions to these problems can
be represented in a formal manner. This representation is given by a design pattern.

2. Distinguish between Coupling and cohesion.


S.no Coupling Cohesion

1 Coupling is a measure of how strongly Cohesion is the measure of relatedness of all th


one object is connected to or elements. These elements can be classes, subsys
dependent upon the other object and so on.

2 An element with low coupling is not An element with high is responsible for doing o
dependent upon too many objects. thing at a time. Hence high cohesion is preferre
Hence normally low coupling is good design
preferred for good design

3. Define GRASP responsibilities.


Responsibilities are a contract or obligation of a classifier (UML definition). Responsibilities can
include behavior, data storage, object creation and more. They often fall into two categories

Doing responsibilities of an object include:

Doing something itself, such as creating an object or doing a calculation

Initiating action in other objects

Controlling and coordinating activities in other objects

Knowing

Knowing responsibilities of object include :


Knowing about private encapsulated data

Knowing about related objects

Knowing about things it can derive or calculate

4. Define creator pattern.


The Creator GRASP ensures that coupling due to object instantiation only occurs on closely
related classes .An aggregate or container of a class is already coupled with that class. Creation of
objects is one of the most common activities in an object-oriented system. Which class is responsible
for creating objects is a fundamental property of the relationship between objects of particular classes.
In general, a class B should be responsible for creating instances of class A if one, or preferably more,
of the following apply:

Instances of B contain or compositely aggregate instances of A


Instances of B record instances of A
Instances of B closely use instances of A
Instances of B have the initializing information for instances of A and pass it on creation
5. Define low coupling.
Name: Low Coupling
Problem: How to reduce the impact of change and encourage reuse?

Solution: Assign a responsibility so that coupling (linking classes) remains low.

6. Define facade controller.


The GRASP mentioned that a Controller that represents an entire subsystem might be called a
Faade Controller. A facade is an object that provides a simplified interface to a larger body of code, such
as a class library.

7. Define polymorphism.
In object-oriented programming, polymorphism (from the Greek meaning "having multiple
forms") is the characteristic of being able to assign a different meaning or usage to something in different
contexts - specifically, to allow an entity such as a variable, a function, or an object to have more than one form.

8. Write about pure fabrication.


To support high cohesion and low coupling, where no appropriate class is present, invent one even if
the class does not represent a problem domain concept .This is a compromise that often has to be made to
preserve cohesion and low coupling. This kind of class is called "Service" in Domain-driven design.

9. Define indirection.
To avoid direct coupling between objects, assign an intermediate object as a mediator. Recall that
coupling between two classes of different subsystems can introduce maintenance problems. Another
possibility is that two classes would be otherwise reusable (in other contexts) except that one has to know
of the other.

10. List out the five GRASP patterns.


Creator
Information Expert
Low Coupling
Controller
High Cohesion
11. Discuss about Responsibility-Driven Design.
The design of objects for a large system is done in terms of responsibilities, roles and
collaborations. This approach is called RDD.

12. Illustrate Information Expert pattern or principle.


Name: Information Expert

Problem: How to assign responsibilities to objects?


Solution: Assign responsibility to the class that has the information needed to fulfill it?

E.g., Board information needed to get a Square

13. State the use of Design patterns.


a. Understandability: Classes are easier to understand in isolation.
b. Maintainability: Classes arent affected by changes in other components.
c. Reusability: easier to grab hold of classes

14. Write the differences between design patterns and frameworks.


Design patterns are more abstract than frameworks.

a. Design patterns are smaller architectural elements than frameworks.


b. Design patterns are less specialized than frameworks
15. State when to use pattern. Patterns are used
when there is a need to represent the solutions to the common software problems in some formal way.
Pattern is normally applied to some context.
16. Write about Adapter pattern.
Problem: How to resolve incompatible interfaces. How to provide a stable interface to the components
having different interfaces?

Solution: Convert the original interface of component into another interface through intermediate
adapter object.

17. Explain the factory pattern.


This pattern is also called as simple factory or concrete factory pattern. This pattern is not a GoF
pattern. If we have a super class and n sub classes, and based on data provided, we have to return the
object of one of the sub classes, we use a factory pattern

18. List out the structural and behavioral pattern.


Structural pattern: Bridge, Adapter

Behavorial pattern: Strategy,Observer

19. Define Bridge pattern.


The bridge pattern is a design pattern used in software engineering that is meant to "decouple an
abstraction from its implementation so that the two can vary independently", introduced by the Gang of
Four (GoF)
20. Write about High cohesion.
Cohesion measures how strongly related and focused are the responsibilities of an element

Name: High Cohesion

Problem: How to keep object focused ,understandable and manageable, and as a side effect, support low
coupling?

Solution: Assign responsibility so that cohesion remains high.

21. Define GRASP patterns?


GRASP patterns are really more accurately described as best practices.
GRASP patterns outline best practices which can be employed in any object-oriented design. These
best practices, if used properly, will lead to maintainable, reusable, understandable, and easy to
develop software.

Nine GRASP patterns: Creator, Information Expert, Low Coupling, Controller, High Cohesion,
Indirection, Polymorphism, Protected Variations ,Pure Fabrication.

22. Define cohesion?


Cohesion the degree to which the information and responsibilities of a class are related to each
other. Cohesion refers to the degree to which the elements of a module belong together. Thus, it is a measure
of how strongly related each piece of functionality expressed by the source code of a software module is.
Cohesion refers to what the class (or module) will do. Low cohesion would mean that the class does a great
variety of actions and is not focused on what it should do. High cohesion would then mean that the class is
focused on what it should be doing, i.e. only methods relating to the intention of the class.

23. Define coupling? (Nov/Dec 2013)


Coupling of classes is a measure of how strongly a class is connected to another class. Coupling is the
degree to which one class knows about another class. Let us consider two classes class A and class B. If class
A knows class B through its interface only i.e it interacts with class B through its API then class A and class
B are said to be loosely coupled.

24. What are the advantages of Factory objects?


Separate the responsibility of complex creation into cohesive helper objects.
Hide potentially complex creation logic.
Allow introduction of performance-enhancing memory management strategies, such as object
caching or recycling.

25. When will the observer pattern be used?


The observer pattern is used when:
The change of a state in one object must be reflected in another
object without keeping the objects tight coupled.
The framework we are writing need to be enhanced in future with
new observers with minimal changes.

UNIT-III

1. Listout the steps for finding use cases Dec-12


Following are the steps used for finding the use cases -
Choose the system boundary.
Identify the primary actor.
Identify the goals for each primary actor.
Define use case that satisfy user goals

2. What is domain model? Dec-13 & May -15


Domain model is a visual representation of conceptual classes or real-situation
objects in a domain. The domain models are also called as conceptual models, domain
object models or analysis object models.

3. Why domain model is referred as visual dictionary?


Domain model shows the abstraction of the conceptual classes. The information
in domain model can be expressed in plain text. But the conceptual classes and their
relationship with other classes can be expressed using visual language such as visual elements and line
connection. Hence domain model is referred as visual dictionary.

4. How to create domain model?


During the design phase, based on the requirements following steps are carried out to create
domain model
Find out the conceptual classes.
Draw the UML class diagram for these classes
Add associations and attributes to these classes.

5. What is association class?


An association class is used to model an association itself as a class and model it with attributes,
operations, and other features. Association classes often occur in many-to-one and many-to-many associations.
For example, if a Company employs many Persons, modeled with an Employs association, you can model the
association itself as the Employment class, with attributes such as startDate

6. What is Elaboration? June,Dec-2014


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.

7. What are the tasks performed in elaboration?


Elaboration is the initial series of iterations, the following tasks are performed
the core, risky software architecture is programmed and tested
the majority of requirements are discovered and stabilized
the major risks are mitigated or retired

8. 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 to which the conceptual class applies

9. How to Create a Domain Model?


1. Find the conceptual classes (see a following guideline).
2. Draw them as classes in a UML class diagram.
3. Add associations and attributes.

10. How to Find Conceptual Classes?


Reuse or modify existing models.
Use a category list.
Identify noun phrases.

11. What is Aggregation? Dec-13,June,Dec-2014


Aggregation is a vague kind of association in the UML that loosely suggests whole-part
relationships (as do many ordinary associations). It has no meaningful distinct semantics in the UML versus a
plain association, but the term is defined in the UML.

12. What is composition? Dec-13,June,Dec-2014


Composition is a special type aggregation where the 'has-a' relationship is more strong.
I.e. the part entity cannot exist without the whole entity. For example an university has departments
which cannot exist on their own with the containing 'university' entity.

13. Define Association.


An association is a relationship between classes (more precisely, instances of those classes) that
indicates some meaningful and interesting connection.
14. List the relationships used in class diagram. Dec-13,June,Dec-2014
Following are the relationships that are used in the class diagram
Association
Aggregation
Composition
Dependency.
15. Define Use case. Dec- 13,May-15
A use case is a collection of related success and failure scenarios that describe an actor using a
system to support a goal. Use cases are text documents, not diagrams, and use-case modeling is primarily an act
of writing text, not drawing diagrams.

16. What do you mean by actors? Dec -11


An actor is the entities that interact with the system or product within the context of behavior of the
system. An actor can be a person (identified by role), computer system, or organization; for example, a cashier.
or
An actor is something with behavior, such as a person (identified by role), computer system, or
organization; for example, a cashier.

17. List out the relationships used in use cases diagram. May -12
Include relationship.
External relationship.
Generalization.

18. Define inception step.

Inception is the initial short step to establish a common vision and basic scope for the project. It will
include analysis of perhaps 10% of the use cases, analysis of the critical non-functional requirement, creation of a
business case, and preparation of the development environment so that programming can start in the following
elaboration phase.
19 . What is generalization relationship?

It is a relationship in which one model element (the child) is based on another model element
Generalization relationships are used in class, component, deployment, and use-case diagrams to indicate that the
child receives all of the attributes, operations, and relationships that are defined in the parent

20. Define the characteristics of aggregation

It does not imply ownership. It is an asymmetric relationship. It is a transitive relationship. It implies


stronger coupling behavior (copy, delete, etc.). An aggregation is a special form of association that models a
whole-part relationship between an aggregate (the whole) and its parts. Aggregation is used to model a
compositional relationship between model elements. Containment of the aggregated class is by reference.
22. What is exclude relationship?
21.
In UML modeling, you can use an extend relationship to specify that one use case
(extension) extends the behavior of another use case (base).

23. What is qualified association?


22.
A qualified association has a qualifier that is used to select an object from a larger set
of related objects based upon the qualifier key. It reduces the multiplicity at the target end of the
association, usually down from many to one because it implies the selection of usually one instance
from a larger set.
23. What are the three strategies to find conceptual classes?
There are three strategies.
Reuse or modify existing models.
Use a category list.
Identify noun phrases.
24. What are the advantages of inception?
Estimation or plans are expected to be reliable.
After inception, design architecture can be made easily because all the use cases are written
in detail.
The life-cycle objectives of the project are stated, so that the needs of every stakeholders
are considered.
Scope and boundary conditions, acceptance criteria and some requirements are established.

25. When to model with Description Classes?


A description class contains information that describes something else. For example,
a product description that records the price, picture, and text description of an item

UNIT IV

1. What is meant by System Sequence Diagrams? June,Dec-14,may15


A system sequence diagram (SSD) is a picture that shows, for a particular scenario of a use case, the events
that external actors generate their order, and inter-system events. All systems are treated as a black box; the
emphasis of the diagram is events that cross the system boundary from actors to systems.
2. Define logical architecture.
The logical architecture is the large scale organization of the software classes into packages (or name
spaces), subsystems and layers.
3. What is the relationship between SSDs and Use Cases? Explain with an example.
An SSD shows system events for one scenario of a Use Case. It is generated from inspection of a Use case as
shown below:

4. Define a layer.
A layer is a very coarse-grained grouping of classes, packages, or subsystems that has cohesive responsibility
for a major aspect of the system. Layers are organized such that higher layers (such as the UI layer) call
upon services of lower layers, but not normally vice versa.
5. What is the use of system sequence diagram?
Following are the things that are carried out by the sequence diagram -

System sequence diagram are useful UML notations for depicting the behavior of the system.

The time based events are messages can also be represented by the sequence diagram.

The sequence diagrams are useful tool to represent what the system does and not how the does.
The sequence diagram is used as a tool to represent the system as a black box.

6. What are tiers, layers and partitions?


The original notion of tier in architecture was a logical layer, not a physical node.
The layers of architecture represent the vertical slices, while partitions represent a horizontal division
of relatively parallel subsystems of a layer.
For example, the Technical services layer may be divided into partitions such as Security and Reporting.
7. What is UML?
A UML classifier is a model element that describes behavioral and structure features.
Classifiers can also be specialized. They are a generalization of many of the elements of the UML, including
classes, interfaces, use cases, and actors. In class diagrams, the two most common classifiers are regular
classes and interfaces.
8. What is Design class diagram (DCD)?
It can explored, the same UML diagram can be used in multiple perspectives. In a conceptual
perspective the class diagram can be used to visualize a domain model. A unique term to clarify when the
class diagram is used in a software or design perspective is called design class diagram (DCD), and all DCDs
form part of the Design Model.

9. What are the ways to show UML attributes?


Attributes of a classifier (also called structural properties) are shown several ways:
Attribute text notation, such as currentSale : Sale.
association line notation
both together

10. Define keywords, stero type, profiles and tags.


UML keywords are a textual adornment to categories model elements.

A stereotype represents a refinement of an existing modeling concept and is defined within a UML profile
informally, a collection of related stereotypes, tags, and constraints to specialize the use of the UML for a
specific domain or platform, such as a UML profile for project management or for data modeling. Eg.
destroy
The stereotype declares a set of tags, using the attribute syntax.
11. Define UML Package diagram. Dec- 13
Package diagram are used to illustrate the logical architecture of a system the layers,
subsystems, packages etc. A layer can be modeled as a UML package. A UML package diagram provides a
way to group elements. The group may contain classes, other packages, use cases and so on.
12. Define system operation.

Operation that the system as a black box component offers in its public interface is called
system operation. System operations can be identified while sketching System sequence diagrams. The
system sequence diagram show system events or I/O messages relative to the system.
13. What do you mean by synchronous and asynchronous call?

An asynchronous message call does not wait for a response. They are used in multi threaded
environments such as .Net and Java so that the new thread executions can be created and initiated. When a
task is being executed asynchronously, there is no need to wait for it to finish, before starting with another
task. In Synchronous message calls, the task has to be completed before starting another task.
14. Define Active class.

An active object runs on and controls its own thread of execution. Active classes are just
Classes which represents an independent flow of control. Active class shares the same properties as all the other
classes. When an active object is created, the associated flow of control is started. When the object is destroyed
the associated flow of control is terminated.
15. How to show methods in class diagram?
A UML method is the implementation of an operation. If constraints are defined, the
method must satisfy them. A method may be illustrated in class diagrams with a UML note symbol stereotype
with <<method>>.
16. Justify why class diagram is called static object modeling.
The UML class diagram does not have any dynamic elements and all the
representations are static. The classes and the methods in the classes do not change with respect to any external
criteria. The characteristics and the methods of a class are standard and constant and cannot be changed.
Therefore, the class diagram is called as static object modeling.
17. List the relationships used in class diagram.
The various relationships used in class diagrams are:
Association with multiplicities
Interface implementation
Inheritance
Dependency
Composition over Aggregation
18. Define singleton class with an example.

When exactly one instance of a class is allowed, it is called a singleton class. In UML
diagram, such a class can be marked with a I in the upper right corner of the name component
19. What is Logical Architecture?

The logical architecture is the large scale organization of the software classes into
packages, namespaces, subsystems and layers. Its called the logical architecture because theres no decision
about how these elements are deployed across different operating system processes or across physical
computers in a network. An architectural pattern expresses a fundamental structural organization schema for
software systems. It provides a set of predefined subsystems, specifies their responsibilities, and
includes rules and guidelines for organizing the relationships between them.
20. What are the types in layered architecture? List the layers in OO system.
Strict layered architecture
Relaxed layered architecture
Layers in OO architecture:
User Interface
Application Logic and Domain Objects
Technical Services

21. Relationship between domain layer and domain model.


The domain layer is part of the software and the domain model is part of the conceptual
perspective analysis. By creating a domain layer with inspiration from the domain model, a lower representation gap
between the real world domain and the software design is achieved.
22. What are the various GoF design patterns?
Adapter
Factory
Singleton
Strategy
Composite
Faade
Observer

23. What is the use of GoF design pattern?


The GoF design patterns help to resolve and simplify the key software development
processes such as,
Flexibility
Extensibility
Dependability
Predictability
Scalability
Efficiency
24. What are the interactive diagrams? List out the components involved in interaction diagrams. What is
the use of interaction diagrams?

The UML interaction diagrams are used to illustrate how objects interact via messages. They
are used for dynamic object modeling. There are two common types: sequence and communication interaction
diagrams
The components that are involved in sequence diagrams are:
Lifeline boxes
A found message
Synchronous message
Asynchronous message
Execution specification bar
Frame with guard expression
Objects
Links
Messages
Sequence numbers
Conditional messages
Looping or iteration messages

25. Define model view separation principle.


The model view separation principle states that model objects should not have
direct knowledge of view objects, at least as view objects. Ex: a register or sale object should not directly send a
message to a GUI window object process Sale Frame, asking it to display something.

UNIT- V
1. What is test driven development?
The test driven development or test first development method is promoted by extreme
programming method and is applicable to unified process and iterative methods, In TDD, the small piece of
code is produced and then tested. If it passes the test then further code is written and then tested. This
procedure is followed for the complete implementation of the system.

2. Enlist the approaches used for generating code from the design?
Various approaches used for generating code from the design are

Define class with methods and attributes from the class diagram.
Creating methods from the interaction diagram.

3. For mapping design to code, what are the fundamental criteria for the order of implementation?
While mapping the design to code, the fundamental criteria is classes need to be
implementation from least coupled to the most coupled.

4. What is the significance of exception and error handling in mapping design to code?
While implementing the code from the design, the exception and error handling is necessary
because on the occurrence of any undesired condition in the code , the code can crash suddenly , In order to
come out of such undesirable situation gracefully, the exception is raised

5. What are the issues in OO testing?

There are various issues in object oriented testing. Following questions lead to various issues in
object oriented testing-

What should be the units for object oriented testing?


What are the implication of composition, encapsulation, inheritance and polymorphism?
What are the levels of object oriented testing?
How to perform data flow testing?
6. What are the advantages of choosing class as a unit of testing in OO testing?

There are two main advantages of choosing class as a unit of testing

The class is used in state chart in which the behavior of the object is represented.
Due to testing classes under the unit testing , the integration testing has clear goals.
7. What is the implication of inheritance in OO testing? What is remedy?
If the class is considered as unit in the OO testing, then having inheritance hierarchy
makes the testing complex because testing all the derived classes is not always possible. To avoid this
problem the classes are flattened, that means, there wont be inheritance at all, all the attribute or methods
that need to be inherited from super class to subclass need to be included in the subclasses explicitly.

8. What is flattening of classes, explain with the help of example.


Flattening the class means removing the inheritance hierarchy. All the attributes
or methods that need to be inherited from super class to subclass need to be included in the subclasses
explicitly.
For example

9. What are the implications of polymorphism in OO testing?


Polymorphism is the capability of an operation exhibiting different behavior in different
instances. Due to this property the programmer is no longer concerned with the internal structure of
object. It results in lack of controllability as actual binding of object reference is not known till run time. It
introduces un-decidability concern in class based testing as it can lead to messages sent to wrong object.

10. Enlist four levels of OO testing.


There are four levels of object oriented testing-

Method or operation testing


Class testing
Integration testing
System testing
11. What are various types of system testing in OO testing?
Recovery testing: How well and quickly does the system recover from faults?

Security testing: verify that protection mechanisms built into the system will protect from unauthorized
access such as hackers, disgruntled employees, fraudsters.

Stress testing: Place abnormal load on the system and then test the system.

Performance testing: Investigate the run- time performance within the context of an integrated
system.

12. Define testing.

Testing is the process of using suitable test cases to evaluate and ensure the quality of a
product by removing or sorting out the errors and discrepancies. It is also used to ensure that the product has
not regressed (such as, breaking a feature that previously worked).Testing involves various types and levels
based on the type of object/product under test.
Testing can be described as a process used for revealing defects in software, and for establishing
that the software has attained a specified degree of quality with respect to selected attributes.

13. What is refactoring?


Refactoring is a structured, disciplined method to rewrite or
restructure existing code without changing its external behavior, applying small transformation steps
combined with re-executing tests at each step. Refactoring is another extreme programming (XP) step
applicable to all iterative methods.

14. What is the need for testing a code?


The programmers and the testers have to execute the program before it gets to the
customer with the specific intent of removing all errors, so that the customer will not experience the
frustration associated with a poor-quality product. In order to find the highest possible number of
errors, tests must be conducted systematically and test cases must be designed using disciplined
techniques.

15. What is class testing?


This deals with checking how the class (smallest testable unit) reacts to a scenario.
These test integrations are for classes and they determine how a class reacts to being created and how
each of its methods reacts to being called in a typical system scenario. The test should determine if the
calling of any methods has undesirable side effects for other methods.

16. What is random class testing?


In random class testing, the classes or the methods of a class can be tested using
random test cases in a random sequence. The test process need not follow a procedure or a finite set of
test cases for the methods of a class.

17. Explain object oriented system testing.


System Testing is the process of removing the test harness and combining the
integrated classes, and testing the system as a whole.

18. Explain about object oriented integration testing.


Integration testing is the process of testing the classes in combination with other
classes. If everything works as expected then it is termed that the class has passed the test. In this test
methodology, the test cases and classes that create errors or are faulty can be removed and replaced
with correct and working classes.

19. What is a test harness?


A test harness is an environment into which a software component can be placed
and tested using test cases. If a class under test does not interact with any other classes, then the test
harness consist of a main program and the class under test. If the class interacts with other classes then
the test harness consists of the main program, the class under test and dummy class to replace the other
classes.

20. Compare system testing and integration testing.


In integration testing, the product is divided into smaller subsystems and tested
separately. They may be combined with other subsystems and tested.

In system testing the test data and the classes are combined as one and tested as a
whole to find out how the entire system works in the test or launch environment.

21. What are test cases? When we say test case is effective?
The usual approach to detecting defects in a piece of software is for the tester to
select a set of input data and then execute the software with the input data under a particular set of
conditions. The tester bundles this information into an item called test case.

A greater probability of detecting defects


A more efficient use of organizational resources
A higher probability for test reuse
Closer adherence to testing and project schedules and budgets
The possibility for delivery of a higher-quality software product
22. What is validation and verification?
Validation is the process of checking whether the specification
captures the customer's needs, while verification is the process of checking that the software meets the
specification.

23. How is class testing different from conventional testing?


Conventional testing focuses on input-process-output, whereas class testing
focuses on each method, then designing sequences of methods to exercise states of a class. In
conventional testing methods the test cases are applied and the output is focused on ie, enter the input
and wait for the valid and correct output. If there is a false output then it signifies the occurrence of an
error. In class testing the methods of the classes under test is subjected to various test cases in a suitable
test environment.
24. Explain about thread based, cluster based, and use based testing in Integration testing.
Thread-based testing testing of all classes which are required to respond to one
system input or event Use-based testing in this the independent classes are tested first and the
dependent classes are tested later.

Cluster testing - groups of collaborating classes are tested for interaction errors.

25. Why do conventional top down and bottom up integration testing methods have less meaning in an
object oriented context?
Basic object oriented software does not have a hierarchical control structure,
hence top down approach and bottom up approach of testing is of less use in testing. Therefore, thread
based, use based and cluster based testing methods are incorporated for performing integration testing.

26. Explain GUI testing.


Graphical user interface testing is the process o testing the look, presentation and the feel of
the software under test. It involves using test cases so as to make the interface and the usage of the application
under test, more easy to use.

27. When does testing of a product/scenario end?


Practically, testing is a process that never ends. This can be expressed in three ways.

The burden of ensuring quality to a product simply shifts from the developer to the
tester and then to the customer.
Testing is done when you run out of time or money.
Use a statistical model:
Assume that errors decay logarithmically with testing time
Measure the number of errors in a unit period
Fit these measurements to a logarithmic curve.

You might also like