Module IV Design

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

MODULE IV DESIGN

PART-B LONG ANSWER QUESTIONS :

1)Explain in detail about Design Patterns?


A.A design pattern provides a general reusable solution for the common problems that
occur in software design. The pattern typically shows relationships and interactions
between classes or objects. The idea is to speed up the development process by providing
well-tested, proven development/design paradigms. Design patterns are programming
language independent strategies for solving a common problem. That means a design
pattern represents an idea, not a particular implementation. By using design patterns, you
can make your code more flexible, reusable, and maintainable.
design patterns are not meant for project development. Design patterns are
meant for common problem-solving.Whenever there is a need, you have to
implement a suitable pattern to avoid such problems in the future. To find out
which pattern to use, you just have to try to understand the design patterns and
their purposes. Only by doing that, you will be able to pick the right one.

Types of Design Patterns


There are mainly three types of design patterns:
Creational
These design patterns are all about class instantiation or object creation. These
patterns can be further categorized into Class-creational patterns and
object-creational patterns. While class-creation patterns use inheritance
effectively in the instantiation process, object-creation patterns use delegation
effectively to get the job done.
Structural
These design patterns are about organizing different classes and objects to form
larger structures and provide new functionality.Structural design patterns are
Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Private Class Data,
and Proxy
Behavioral
Behavioral patterns are about identifying common communication patterns
between objects and realizing these patterns.Behavioral patterns are Chain of
responsibility, Command, Interpreter, Iterator, Mediator, Memento, Null Object,
Observer, State, Strategy, Template method, Visitor.
For more information visit:https://sourcemaking.com/design_patterns
2)Explain in detail about Scenario-based Modeling ?
A.

3)Explain in detail about Class-based Modeling?


AClass-based modeling identifies classes, attributes and relationships that the system
will use. In the airline application example, the traveler/user and the boarding pass
represent classes. The traveler's first and last name, and travel document type
represent attributes, characteristics that describe the traveler class. The relationship
between traveler and boarding pass classes is that the traveler must enter these details
into the application in order to get the boarding pass, and that the boarding pass
contains this information along with other details like the flight departure gate, seat
number etc.
Class based modeling represents the object. The system manipulates the operations.
The elements of the class based model consist of classes and object, attributes,
operations, class – responsibility - collaborator (CRS) models.

Example Use Case


let's assume scenario-based modeling has already been completed and resulted
in the following use case: Sunny Beach Hotel purchases an advertisement in the
''Best Hotels'' travel book published by Acme Publishing. The client for the
software development project is Acme Publishing, which has commissioned an
application to manage the whole publication process, from selling an
advertisement to a client to creating the book's content to finally printing,
shipping, and selling the book.

FOR MORE INFO:https://www.ques10.com/p/37499/class-based-modeling-1/

4)Explain in detail about Object Design Process?


A)
● OOD is the process of constructing a solution's object model. Said another
way, OOD is the process of breaking down a solution into a number of
constituent objects.
● Object-oriented design centers on finding an appropriate set of classes
and defining their contents and behavior. It involves determining the proper
use set of classes and then filling in the details of their implementation.
Object-oriented design is fundamentally a three-step process: identifying
the classes, characterizing them, and then defining the associated actions
INCOMPLETE

5)Brief about Structured Analysis vs Object Oriented Analysis?


A)

Structured Analysis Object-Oriented Analysis

The main focus is on the process The main focus is on data structure and
and procedures of the system. real-world objects that are important.

It uses System Development Life


Cycle (SDLC) methodology for
It uses Incremental or Iterative
different purposes like planning,
methodology to refine and extend our
analyzing, designing, implementing,
design.
and supporting an information
system.

It is suitable for well-defined projects It is suitable for large projects with


with stable user requirements. changing user requirements.

Risk while using this analysis


Risk while using this analysis technique
technique is high and reusability is
is low and reusability is also high.
also low.

Structuring requirements include Requirement engineering includes the


DFDs (Data Flow Diagram), Use case model (find Use cases, Flow
Structured Analysis, ER (Entity of events, Activity Diagram), the Object
Relationship) diagram, CFD (Control model (find Classes and class relations,
Flow Diagram), Data Dictionary, Object interaction, Object to ER
Decision table/tree, and the State mapping), Statechart Diagram, and
transition diagram. deployment diagram.

This technique is new and is mostly


This technique is old and is not preferred.
preferred usually.

6)Explain the techniques in Domain Analysis?


A)In software engineering, domain analysis, or product line analysis, is the
process of analyzing related software
systems in a domain to find their common and variable parts. It is a model of
wider business context for the system. The term was coined in the early 1980s
by James Neighbors.Domain analysis is the first phase of domain engineering. It
is a key method for realizing systematic software reuse.
Domain analysis produces domain models using methodologies such as domain
specific languages, feature tables, facet tables, facet templates, and generic
architectures, which describe all of the systems in a domain. Several
methodologies for domain analysis have been proposed.
The products, or "artifacts", of a domain analysis are sometimes object-oriented
models (e.g. represented with the Unified Modeling Language (UML)) or data
models represented with entity-relationship diagrams (ERD). Software
developers can use these models as a basis for the implementation of software
architectures and applications. This approach to domain analysis is sometimes
called model-driven engineering.
7)Explain the steps in effective Modular Design?
A)
● Any software comprises of many systems which contains several
sub-systems and those sub-systems further contains their sub-systems.
So, designing a complete system in one go comprising of each and every
required functionality is a hectic work and the process can have many
errors because of its vast size.
● Thus in order to solve this problem the developing team breakdown the
complete software into various modules. A module is defined as the unique
and addressable components of the software which can be solved and
modified independently without disturbing ( or affecting in very small
amount ) other modules of the software. Thus every software design
should follow modularity.
● The process of breaking down a software into multiple independent
modules where each module is developed separately is called
Modularization
● Effective modular design can be achieved if the partitioned modules
are separately solvable, modifiable as well as compilable. Here
separate compilable modules means that after making changes in a
module there is no need of recompiling the whole software system
10)Explain the phases in Structured Analysis?
A.Structured Analysis and Structured Design (SA/SD) is a diagrammatic
notation that is designed to help people understand the system. The basic goal of
SA/SD is to improve quality and reduce the risk of system failure. It establishes
concrete management specifications and documentation. It focuses on the
solidity, pliability, and maintainability of the system.
Basically, the approach of SA/SD is based on the Data Flow Diagram. It is easy
to understandSA/SD but it focuses on well-defined system boundary whereas the
JSD approach is too complex and does not have any graphical representation.

SA has mainly two phases:


1.Analysis Phase: It uses Data Flow Diagram, Data Dictionary, State Transition
diagram and ER diagram.
❖ Data Flow Diagram:In the data flow diagram, the model describes how the
data flows through the system. We can incorporate the Boolean operators
and & or link data flow when more than one data flow may be input or
output from a process.
❖ Data Dictionary:The content that is not described in the DFD is described
in the data dictionary. It defines the data store and relevant meaning. All
system names, whether they are names of entities, types, relations,
attributes, or services, should be entered in the dictionary.
❖ State Transition diagram:It is similar to the dynamic model. It specifies how
much time the function will take to execute and data access triggered by
events. It also describes all of the states that an object can have, the
events under which an object changes state, the conditions that must be
fulfilled before the transition will occur and the activities were undertaken
during the life of an object.
❖ ER diagram:ER diagram specifies the relationship between data store. It is
basically used in database design. It basically describes the relationship
between different entities.
2.Design Phase: It uses Structure Chart and Pseudo Code
For more information:
https://www.geeksforgeeks.org/structured-analysis-and-structured-design-sa-sd

12)Explain in detail about Design Concepts and Principles?


A.

13)Define state diagram? Sketch an example to explain state diagram?


A. A state diagram, also known as a state machine diagram or statechart
diagram, is an illustration of the states an object can attain as well as the
transitions between those states in the Unified Modeling Language (UML)

Symbols and components of state diagrams


The structure of a state diagram depends on the system being modeled, but
typically includes the following components and notations:

● Initial state- Usually marked by a solid black circle, this represents


the initial state of a system or a class.
● Middle states- These are portrayed as boxes with rounded corners.
There may be one or two horizontal lines through a box, dividing it
into stacked sections. In that case, the upper section contains the
name of the state, the middle section (if any) contains the state
variables and the lower section contains the actions performed in
that state. If there are no horizontal lines through a box, only the
name of the state is written inside it.
● Transitions- External straight lines, each with an arrow at one end,
connect various pairs of boxes. These lines define the transitions
between states.
● Final state- The final state is portrayed as a large black dot with a
circle around it

Example:

A system that can be modeled with a state diagram could be an ATM. The
initial state of the system is “ready” to be triggered into action by a customer.
Middle states could include verifying the user, processing the request or
malfunctioning. Events are determined by the user, such as checking bank
balance, withdrawing cash or depositing a check. The final state is reached
when the machine successfully executes and ends a session.
13)Define Analysis? Elements of the analysis model?

A. Analysis Model is a technical representation of the system. It acts as a link


between system description and design model. In Analysis Modelling,
information, behavior, and functions of the system are defined and translated into
the architecture, component, and interface level design in the design modeling.

OBJECTIVES OF ANALYSIS MODEL:

It must establish a way of creating software design.

It must describe the requirements of the customer.

It must define a set of requirements that can be validated, once the software is
built.

Elements of Analysis Model:


Data Dictionary:

Entity Relationship Diagram (ERD):

Data Flow Diagram (DFD):

State Transition Diagram:

Process Specification:It stores the description of each function present in


the data flow diagram. It describes the input to a function, the algorithm
that is applied for the transformation of input, and the output that is
produced. It also shows regulations and barriers imposed on the
performance characteristics that are applicable to the process and layout
constraints that could influence the way in which the process will be
implemented.

Control Specification:It stores additional information about the control


aspects of the software. It is used to indicate how the software behaves
when an event occurs and which processes are invoked due to the
occurrence of the event. It also provides the details of the processes which
are executed to manage events.

Data Object Description:It stores and provides complete knowledge about a


data object present and used in the software. It also gives us the details of
attributes of the data object present in the Entity Relationship Diagram.
Hence, it incorporates all the data objects and their attributes.

14)Define flow-oriented elements?

A.The Flow oriented elements are:

i. Data flow model:

● It is a graphical technique. It is used to represent information

flow.
● The data objects are flowing within the software and transformed

by processing the elements.

● The data objects are represented by labeled arrows.

Transformation are represented by circles called as bubbles.

● DFD shown in a hierarchical fashion. The DFD is split into

different levels. It also called as 'context level diagram'.

ii. Control flow model:

● Large class applications require a control flow modeling.

● The application creates control information instated of reports or

displays.

● The applications process the information in specified time.

● An event is implemented as a boolean value.

For example, the boolean values are true or false, on or off, 1 or

0.

iii. Control Specification:

● A short term for control specification is CSPEC.

● It represents the behaviour of the system.

● The state diagram in CSPEC is a sequential specification of the

behaviour.

● The state diagram includes states, transitions, events and

activities.
● State diagram shows the transition from one state to another

state if a particular event has occurred.

iv. Process Specification:

● A short term for process specification is PSPEC.

● The process specification is used to describe all flow model

processes.

● The content of process specification consists narrative text,

Program Design Language(PDL) of the process algorithm,

mathematical equations, tables or UML activity diagram.

15)Define cardinality? Explain with example ?

A. Cardinality defines “the maximum number of objects that can participate in a


relationship” . It does not, however, provide an indication of whether or not a
particular data object must participate in the relationship. To specify this
information, the data model adds modality to the object/relationship pair.For
example, an uncle can have many nephews, while a nephew can have many uncles.
(or)

The data model must be capable of representing the number of occurrences objects
in a given relationship. Tillmann defines the cardinality of an object/relationship pair
in the following manner:

Cardinality is the specification of the number of occurrences of one [object] that can
be related to the number of occurrences of another [object]. Cardinality is usually
expressed as simply 'one' or 'many.' For example, a husband can have only one wife
(in most cultures), while a parent can have many children. Taking into consideration
all combinations of 'one' and 'many,' two [objects] can be related as

• One-to-one (l:l)—An occurrence of [object] 'A' can relate to one and only one
occurrence
of [object] 'B,' and an occurrence of 'B' can relate to only one occurrence of 'A.'

• One-to-many (l:N)—One occurrence of [object] 'A' can relate to one or many


occurrences

of [object] 'B,' but an occurrence of 'B' can relate to only one occurrence of 'A.'

For example, a mother can have many children, but a child can have only one
mother.

• Many-to-many (M:N)—An occurrence of [object] 'A' can relate to one or more


occurrences

of 'B,' while an occurrence of 'B' can relate to one or more occurrences of 'A.'

16)Define structured analysis? What are the structured analysis tools

explain ?

A.Structured Analysis is a development method that allows the analyst

to understand the system and its activities in a logical way. It is a

systematic approach, which uses graphical tools that analyze and

refine the objectives of an existing system and develop a new system

specification which can be easily understandable by user.

It has following attributes −


● It is graphic which specifies the presentation of application.

● It divides the processes so that it gives a clear picture of system

flow.

● It is logical rather than physical i.e., the elements of system do

not depend on vendor or hardware.

● It is an approach that works from high-level overviews to

lower-level details

Structured Analysis Tools: During Structured Analysis, various tools

and techniques are used for system development.

They are -

● Data Flow Diagrams

● Data Dictionary

● Decision Trees

● Decision Tables

● Structured English

● Pseudocode

17)Describe basic the elements of DFD? What are the structured

analysis tools explain?

A.DFD or Bubble chart is a technique developed by larry constantine to express

the requirements of system in a graphical form.


● It shows the flow of data between various functions of system and

specifies how the current system is implemented.

● It is an initial stage of design phase that functionally divides the

requirement specification down to the lowest level of detail.

● Its graphical nature makes it a good communication tool between user

and analyst or analyst and system designer.

● It gives an overview of what data a system processes,what

transformations are performed,what data are stored,what results are

produced andwhere they flow.

(or)

Data flow diagram is graphical representation of flow of data in an

information system. It is capable of depicting incoming data flow,

outgoing data flow and stored data. The DFD does not mention anything

about how data flows through the system. There is a prominent

difference between DFD and Flowchart. The flowchart depicts flow of

control in program modules. DFDs depict flow of data in the system at

various levels. DFD does not contain any control or branch elements.

Types of DFD Data Flow Diagrams are either Logical or Physical. Logical

DFD - This type of DFD concentrates on the system process, and flow of

data in the system.For example in a Banking software system, how data

is moved between different entities. Physical DFD - This type of DFD

shows how the data flow is actually implemented in the system. It is

more specific and close to the implementation.


BASIC ELEMENTS OF DFD:

DFD is easy to understand and quite effective when the required design is not

clear and the user wants a notational language for communication.However, it

requires a large number of iterations for obtaining the most accurate and

complete solution.

Entities - Entities are source and destination of information data. Entities are

represented by a rectangles with their respective names.

Process - Activities and action taken on the data are represented by Circle or

Round-edged rectangles.

Data Storage - There are two variants of data storage - it can either be

represented as a rectangle with absence of both smaller sides or as an

open-sided rectangle with only one side missing.

Data Flow - Movement of data is shown by pointed arrows. Data movement is

shown from the base of arrow as its source towards head of the arrow as

destination
Structured analysis and tools: refer previous question

18)Define user object model? Create user object model diagram?

A.Object diagrams are derived from class diagrams so object diagrams are dependent

upon class diagrams.

Object diagrams represent an instance of a class diagram. The basic concepts are

similar for class diagrams and object diagrams. Object diagrams also represent the

static view of a system but this static view is a snapshot of the system at a particular

moment.
Object diagrams are used to render a set of objects and their relationships as an

instance

How to create:

● First, analyze the system and decide which instances have important data and

association.

● Second, consider only those instances, which will cover the functionality.

● Third, make some optimization as the number of instances are unlimited.

( reference:Before drawing an object diagram, the following things should be

remembered and understood clearly −

● Object diagrams consist of objects.

● The link in object diagram is used to connect objects.

● Objects and links are the two elements used to construct an object

diagram.

After this, the following things are to be decided before starting the construction of the

diagram −

● The object diagram should have a meaningful name to indicate its

purpose.

● The most important elements are to be identified.

● The association among objects should be clarified.

● Values of different elements need to be captured to include in the object

diagram.
● Add proper notes at points where more clarity is required)

User object model:

19)Describe the Interface design elements?

A.User interface is the front-end application view to which user interacts in order

to use the software. The software becomes more popular if its user interface is:

Attractive,Simple to use,Responsive in short time ,Clear tounderstand,Consistent


on all interface.

Design process
refer:https://www.geeksforgeeks.org/software-engineering-user-interface-design/

20)Discuss the Architectural design elements?

A.The software needs the architectural design to represents the design of


software. IEEE defines architectural design as “the process of defining a
collection of hardware and software components and their interfaces to establish
the framework for the development of a computer system.” The software that is
built for computer-based systems can exhibit one of these many architectural
styles.

Each style will describe a system category that consists of :

● A set of components(eg: a database, computational modules) that will


perform a function required by the system.
● The set of connectors will help in coordination, communication, and
cooperation between the components.
● Conditions that how components can be integrated to form the system
● Semantic models that help the designer to understand the overall
properties of the system.

● Entity Relationship Diagram (ERD):


● Entity Relationship Diagram (ERD):

You might also like