Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

Object Oriented

Analysis and
Design ANSWER
KEY -Raa .Harini
Define an object. Identify the probable
attributes that will be modeled in a
Library database for the object BOOK.

Anything in the real world in an object. It has,

✓ properties/attributes - describe the state of an object

✓ Methods/procedures - define its behavior

✓ Attributes for BOOK are AuthorName, Title, Price, Publication.


Outline the purpose of using use cases, to
describe requirements.

Use cases are simply written stories.


However, they are a popular tool in requirements analysis and are an important
part of UP.
They describe the useful functions of the system.
A use case is a list of steps, typically defining interactions between an actor and a
system, to achieve a goal.
Describing requirements are based on
• understand precisely what is required of the software
• communicate this understanding precisely to all development parties
3) Define Cohesion and coupling.
Coupling:
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. 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.

Cohesion:
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.
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.
Outline the key reason for modeling a package
diagram.
A package contains a group or related use cases or model.
They are most useful to organize use cases and other models when
they get too large or complex to represent in a simple diagram.
A package diagram is one that shows “packages” of artifacts (e.g.,
use cases, class diagram, etc.) and their respective dependencies.
A dependency between any two entities exists when events, actions
and definitions in one entity influence events, actions and
definitions in the other entity.
What are design patterns?

Principles and idioms codified in a structured format describing the


problem, solution, and given a name are called patterns. Design
pattern is a general repeatable solution to a commonly
occurring problem in software design. A design pattern isn't a
finished design that can be transformed directly into code. It is a
description or template for how to solve a problem that can be
used in many different situations.
Name the two types of UML interaction
diagrams.

Two types of UML interaction diagrams are

• Sequence Diagram

• Collaboration Diagram
Define : Unit Testing.

✓ In unit testing, the individual classes are tested. It is seen


whether the class attributes are implemented as per design and
whether the methods and the interfaces are error-free.

✓ Unit testing is the responsibility of the application engineer who


implements the structure.
9)Define a test case. Give example.

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.

Test cases for login form


✓ Test case id
✓ Test case(unit to test)
✓ Preconditions
✓ Input test data
✓ Priority
✓ Steps to be executed
✓ Expected result
✓ Actual result
✓ Pass/Fail Comments
Define OOAD.

OOA is an emphasis on finding and describing the objects or concepts in the


problem domain.
Example: In the case of the library information system, some of the concepts
include
Book, Library, and Patron.

Object-oriented design is an emphasis on defining software objects and how


they collaborate to fulfill the requirements.
Finally, during implementation or object-oriented programming, design
objects are implemented, such as a Book class in Java.

Example: In the library system, a Book software object may have a


title attribute and a getChapter method
What are the three perspectives to apply
UML?

Conceptual Perspective - diagrams are interpreted as describing


things in a real world situation or domain of interest.

Specification or software perspective – diagrams describes the


software abstractions of components with specifications and interfaces.

Implementation of software perspective – diagrams describe


software implementation in a particular technology such as Java.
10. Distinguish between coupling and
cohesion.
Define modular design.

Modularity is the process of decomposing a problem (program) into a


set of modules so as to reduce the overall complexity of the problem.

Modularity can be visualized as a way of mapping encapsulated


abstractions into real, physical modules having high cohesion within
the modules and their inter–module interaction or coupling is low.
What is Inception?
What is inception?

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.
What is the relationship between a
conceptual superclass and a subclass?

100% Rule – 100% of the conceptual super class‘s definition should


be applicable to the sub class. The subclass must conform to 100% of
super class‘s: attributes and associations.

Is- a Rule - All the members of a subclass set must be members of


their super class set. Conceptual subclass is a kind of super class.
More tersely, is-a-kind-of is called is-a.
What is the purpose of extends and include
relationship in use case diagrams?
Include relationship
This relationship denotes that a given use case may include another.

When there are multiple steps to carry out the single task , then this
task is divided into sub-functions and these sub-functions are
denoted by use cases.

For example in the scenario of online shopping :

The customer pays for the product either by card(includes


relationship)

By means of UPI (includes relationship)

By cash(includes relationship)
What are the strengths and weaknesses of
Sequence and Collaboration Diagrams?
Difference between logical architecture
and layers?

Logical architecture is the large-scale organization of the software


classes into packages (or namespaces), subsystems, and layers.

Logical – because there‘s no decision about how these elements are


deployed across different operating system processes or across
physical computers in a network (deployment architecture).
Layering Pattern

A layer is a very coarse-grained grouping of classes,


packages, or subsystems that has cohesive responsibility for
a major aspect of the system.

Also, layers are organized such that ―higher layers (such as


the UI layer) call upon services of ―lower layers, but not
normally vice versa.

Strict layered architecture VS Relaxed Layered Achitecture

A logical architecture doesn‘t have to be organized in


layers.
What are the steps for mapping designs to
code?

Write source code for:

✓ Class and interface definitions

✓ Method definitions

Work from OOA/D artifacts:

✓ Create class definitions for Domain Class Diagrams (DCDs)

✓ Create methods from Interaction diagrams


What is OO Integration testing?
The software testing phase where individual where individual software modules and
combined and tested together.

It occurs after unit testing and before validation testing.

https://www.youtube.com/watch?v=0GypdsJulKE

You might also like