0% found this document useful (0 votes)
15 views

Unit 5 Material

The document discusses procedural design versus object-oriented design, architectural design styles and patterns, the importance of user interface design, and golden rules for user interface design. It provides details on the differences between procedural and object-oriented design, lists some common architectural styles and patterns, and outlines key principles for user interface design including consistency, enabling shortcuts, and providing informative feedback.

Uploaded by

b628234
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Unit 5 Material

The document discusses procedural design versus object-oriented design, architectural design styles and patterns, the importance of user interface design, and golden rules for user interface design. It provides details on the differences between procedural and object-oriented design, lists some common architectural styles and patterns, and outlines key principles for user interface design including consistency, enabling shortcuts, and providing informative feedback.

Uploaded by

b628234
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Unit 5: Software Design

1. Differentiate Procedural Design and Object-Oriented Design.

Procedural Design Object Oriented Design


It is a programming language that is Object-oriented programming is a
derived from structure programming and computer programming design
based upon the concept of calling philosophy or methodology that
procedures. It follows a step-by-step organizes/ models software design around
approach in order to break down a task data or objects rather than functions and
into a set of variables and routines via a logic.
sequence of instructions.
It is less secure than OOPs. Data hiding is possible in object-oriented
programming due to abstraction. So, it is
more secure than procedural
programming.
It follows a top-down approach. It follows a bottom-up approach
In procedural programming, data moves In OOP, objects can move and
freely within the system from one communicate with each other via member
function to another. functions
It is structure/procedure-oriented. It is object-oriented.
There are no access modifiers in The access modifiers in OOP are named
procedural programming. as private, public, and protected
Procedural programming does not have There is a feature of inheritance in object-
the concept of inheritance. oriented programming.
There is no code reusability present in It offers code reusability by using the
procedural programming. feature of inheritance.
Overloading is not possible in procedural In OOP, there is a concept of function
programming. overloading and operator overloading.
It gives importance to functions over It gives importance to data over functions.
data.
In procedural programming, there are no In OOP, there is an appearance of virtual
virtual classes. classes in inheritance.
It is not appropriate for complex It is appropriate for complex problems.
problems.
There is not any proper way for data There is a possibility of data hiding.
hiding.
In Procedural programming, a program In OOP, a program is divided into small
is divided into small programs that are parts that are referred to as objects.
referred to as functions.
Examples of Procedural programming The examples of object-oriented
include C, Fortran, Pascal, and VB. programming are -
.NET, C#, Python, Java, VB.NET, and
C++.

2. What is Architectural Design? Enlist different styles and patterns of


architecture.

1
Architecture serves as a blueprint for a system. It provides an abstraction to manage the
system complexity and establish a communication and coordination mechanism among
components. It defines a structured solution to meet all the technical and operational
requirements, while optimizing the common quality attributes like performance and security.
Further, it involves a set of significant decisions about the organization related to software
development and each of these decisions can have a considerable impact on quality,
maintainability, performance, and the overall success of the final product.

• Large systems are decomposed into subsystems


• Sub-systems provide related services
• Initial design process includes
• Identifying sub-systems
• Establishing a framework for sub-system control and communication

Why to document the Architecture?

• Stakeholder Communication: High-level presentation of system


• System Analysis: Big effect on performance, reliability, maintainability and others
• Large-scale Reuse: Similar requirements similar architecture

Architectural Styles

• Data-centred architecture style


• Data-flow architectures
• Call and return architecture
• Object-oriented architecture
• Layered architecture

Data-centred architecture style

• A data store (Ex., a file or database) resides at the center of this architecture and is
accessed frequently by other components.
• Client software accesses a central repository.
• In some cases, the data repository is passive.
• That is, client software accesses the data independent of any changes to the data or the
actions of other client software.

2
Data-flow architectures

• This architecture is applied when input data are to be transformed.


• A set of components (called filters) connected by pipes that transmit data from one
component to the next.
• Each filter works independently of those components upstream and downstream, is
designed to expect data input of a certain form, and produces data output (to the next
filter) of a specified form.

Call and return architecture

• This architectural style enables a software designer (system architect) to achieve a


program structure that is relatively easy to modify and scale.
• A number of sub styles exist within this category as below.
• Main program/subprogram architectures
• This classic program structure decomposes function into a control hierarchy where a
“main” program invokes a number of program components, which in turn may invoke
still other components.
• Remote procedure call architectures
• The components of a main program/subprogram architecture are distributed across
multiple computers on a network.

Object-oriented architecture

3
• A number of different layers are defined, each accomplishing operations that
progressively become closer to the machine instruction set.
• At the outer layer, components service user interface operations.
• At the inner layer, components perform operating system interfacing.
• Intermediate layers provide utility services and application software functions.

3. What is the importance of User Interface? Explain User Interface design


rules.

In simple terms, a user interface is the features of a device or an application that allow
a user to interact with it. Let’s say you are filing a company’s contact form on a website
to receive the web design service for your business. In this case, the user interface
would consist of a text box, a drop-down list, a radio button, and any other component
to collect information about your business goals, needs, and requirements. User
Interface (UI) Design is the link between users and the website, app, or software. UI
design can refer to graphical user interfaces as well as other forms—e.g., voice-
controlled interfaces.

we know that UI Design is all about structure, communication, and conversions. The
business site should be designed in a way to display the services that you offer without
ambiguity, to draw your visitors’ attention, and keep them on your site.

Simply put, a good User Interface is important because it can turn potential visitors
into buyers as it facilitates interactions between the user and your website or web
application. The UI not only focuses on aesthetics but also maximizes responsiveness,

4
efficiency, and accessibility of a website. It is professional web design because UI
makes a difference. UI design helps improve the conversion rate on a website.

An interface is a point where users interact with the website they’re using. A good User
Interface design presents a seamless blend of visual design, interaction design, and
information architecture.

4. Describe golden rules of User Interface Design.

The Golden Rules of User Interface Design

The user interface (UI) is a critical part of any software product. When it’s done well, users
don’t even notice it. When it’s done poorly, users can’t get past it to efficiently use a product.
To increase the chances of success when creating user interfaces, most designers follow
interface design principles. Interface design principles represent high-level concepts that are
used to guide software design.

1. Strive for consistency

Designing “consistent interfaces” means using the same design patterns and the same

sequences of actions for similar situations. This includes, but isn’t limited to, the right use of

color, typography, and terminology in prompt screens, commands, and menus throughout your

user journey.

Remember: a consistent interface will allow your users to complete their tasks and goals much

more easily.

2. Enable Frequent Users to Use Shortcuts

Speaking of using UI rules as shortcuts, your users will benefit from shortcuts as well,

especially if they need to complete the same tasks often.

Expert users might find the following features helpful:


• Abbreviations
• Function keys
• Hidden commands
• Macro facilities

5
3. Offer informative feedback

For every user action, there should be interface feedback. For frequent and minor actions, the

response can be modest, while for infrequent and major actions, the response should be more

substantial. Visual presentation of the objects of interest provides a convenient environment for

showing changes explicitly.

4. Design dialogs to yield closure

Sequences of actions should be organized into groups with a beginning, middle, and end.

Informative feedback at the completion of a group of actions gives users the satisfaction of

accomplishment, a sense of relief, the signal to drop contingency plans from their minds, and

an indicator to prepare for the next group of actions. For example, e-commerce websites move

users from selecting products to the checkout, ending with a clear confirmation page that

completes the transaction.

5. Offer Simple Error Handling

A good interface should be designed to avoid errors as much as possible. But when errors do

happen, your system needs to make it easy for the user to understand the issue and know how

to solve it. Simple ways to handle errors include displaying clear error notifications along with

descriptive hints to solve the problem.

As much as possible, design the system so the user cannot make a serious error. If an error is

made, the system should be able to detect the error and offer a simple, comprehensive
mechanism for handling the error.

Error Prevention:
• Error prevention over error correction
• Automatic detection of errors
• Clear error notifications
• Hints for solving the problem

6. Permit easy reversal of actions

6
This feature relieves anxiety since users know that errors can be undone, and encourages

exploration of unfamiliar options. The units of reversibility may be a single action, a data-

entry task, or a complete group of actions, such as entry of a name-address block.

7. Keep users in control

Experienced users strongly desire the sense that they are in charge of the interface and that the

interface responds to their actions. They don’t want surprises or changes in familiar behavior,

and they are annoyed by tedious data-entry sequences, difficulty in obtaining necessary

information, and inability to produce their desired result.

8. Reduce short-term memory load

Humans’ limited capacity for information processing in short-term memory (the rule of thumb

is that people can remember “seven plus or minus two chunks” of information) requires that

designers avoid interfaces in which users must remember information from one display and

then use that information on another display. It means that cellphones should not require

reentry of phone numbers, website locations should remain visible, and lengthy forms should

be compacted to fit a single display.

These underlying principles must be interpreted, refined, and extended for each environment.

They have their limitations, but they provide a good starting point for mobile, desktop, and

web designers. The principles presented in the ensuing sections focus on increasing users’

productivity by providing simplified data-entry procedures, comprehensible displays, and

rapid informative feedback to increase feelings of competence, mastery, and control over the
system.

The goal for UI designers is to produce user-friendly interfaces: interfaces that encourage

exploration without fear of negative consequences. Without any doubt interfaces of the future

will be more intuitive, enticing, predictable, and forgiving, but most principles of UI design

listed in this article will surely be applicable. 8 These Golden Rules from Schneider ensure a

good design but can ease the burden experienced by users in using applications that we make.

7
5. What is Object Oriented Design of a system? Draw the Use case
diagram and Class diagram for Library Management system.
Object Oriented Design of a system

• Object-oriented design (OOD) is the process of using an object-oriented methodology


to design a computing system or application. This technique enables the
implementation of a software solution based on the concepts of objects.
• OOD serves as part of the object-oriented programming (OOP) process or lifecycle.
• In object-oriented system design and development, OOD helps in designing the
system architecture or layout - usually after completion of an object-oriented analysis
(OOA). The designed system is later created or programmed using object-oriented
based techniques and/or an object-oriented programming language (OOPL).
• The OOD process takes the conceptual systems model, use cases, system relational
model, user interface (UI) and other analysis data as input from the OOA phase. This
is used in OOD to identify, define and design systems classes and objects, as well as
their relationship, interface and implementation.

Class diagram of Library Management system

Figure: Class diagram of Library Management System

Use case diagram of Library Management system

8
Figure: Use Case diagram of Library Management System

6. Compare coupling and cohesion

Coupling Cohesion
Coupling is also called Inter-Module Cohesion is also called Intra-Module
Binding. Binding.
Coupling shows the relationships between Cohesion shows the relationship within the
modules. module.
Coupling shows the Cohesion shows the module's
relative independence between the modules. relative functional strength.
While creating, you should aim for low While creating you should aim for high
coupling, i.e., dependency among modules cohesion, i.e., a cohesive component/
should be less. module focuses on a single function (i.e.,
single-mindedness) with little interaction
with other modules of the system.
In coupling, modules are linked to the other In cohesion, the module focuses on a single
modules. thing.

7. Explain user interface design issues


Design issues such as response time, command and action structure, error handling, and
help facilities are considered as the design model is refined. This phase serves as the
foundation for the implementation phase.
Some issues need to be considered while designing a good user interface design. These issues
should be taken care of so that they do not cause any technical problems.

9
• Response Time: This is the mean time between request and response or the software
with the desired output. It can be measured in length and variability. If the response
time is too long, then the user becomes frustrated.
• Error Handling: Poor error message may result in rejecting the product rather than
accepting it. An error message should describe the problem in words that are easy to
understand by the user.
• Help Facilities: The end-user requires help when he needs some information, and he
cannot find it or if the user is in trouble. Both of these requirements considered in the
help system design and must be available all the time.
• Application Accessibility: It states whether the application is simple to interact with
or not. Special guidelines are given to user while interacting with software.

8. Compare Coupling and Cohesion. Explain different types of Coupling


and its effects on software modules
Types of Module Coupling
1. No Direct Coupling: In this case, modules are subordinates to different modules.
Therefore, no direct coupling.

2. Data Coupling: When data of one module is passed to another module, this is called
data coupling.
3. Stamp Coupling: Two modules are stamp coupled if they communicate using
composite data items such as structure, objects, etc. When the module passes non-global
data structure or entire structure to another module, they are said to be stamp coupled.
For example, passing structure variable in C or object in C++ language to a module.
4. Control Coupling: Control Coupling exists among two modules if data from one
module is used to direct the structure of instruction execution in another.
5. External Coupling: External Coupling arises when two modules share an externally
imposed data format, communication protocols, or device interface. This is related to
communication to external tools and devices.
6. Common Coupling: Two modules are common coupled if they share information
through some global data items.
7. Content Coupling: Content Coupling exists among two modules if they share code,
e.g., a branch from one module into another module.
9. Compare Coupling and Cohesion. Explain different types of Coupling
and its effects on software modules.
Refer Answer of Question no. 6

10.What is software architecture? Explain any two architectural styles of


software.
Refer Answer of Question no. 2

10
11.Explain different design Concepts in details.

• Software design sits at the technical core of software engineering and is applied
regardless of the software process model that is used.
• The design task produces a data design, an architectural design, an interface design, and
a component design.

Abstraction

• A solution is stated in large terms using the language of the problem environment at the
highest level abstraction.

• The lower level of abstraction provides a more detail description of the solution.
• A sequence of instruction that contain a specific and limited function refers in a
procedural abstraction.
• A collection of data that describes a data object is a data abstraction.

Architecture

• The complete structure of the software is known as software architecture.


• Structure provides conceptual integrity for a system in a number of ways.
• The architecture is the structure of program modules where they interact with each other
in a specialized way.
• The components use the structure of data.
• The aim of the software design is to obtain an architectural framework of a system.
• The more detailed design activities are conducted from the framework.

Patterns

• A design pattern describes a design structure and that structure solves a particular
design problem in a specified content.

Modularity

• A software is separately divided into name and addressable components. Sometime


they are called as modules which integrate to satisfy the problem requirements.
• Modularity is the single attribute of a software that permits a program to be managed
easily.

Information hiding

• Modules must be specified and designed so that the information like algorithm and data
presented in a module is not accessible for other modules not requiring that information.

Functional independence

• The functional independence is the concept of separation and related to the concept of
modularity, abstraction and information hiding.
• The functional independence is accessed using two criteria i.e Cohesion and coupling.

11
• Cohesion: Cohesion is an extension of the information hiding concept.
• A cohesive module performs a single task and it requires a small interaction with the
other components in other parts of the program.
• Coupling: Coupling is an indication of interconnection between modules in a structure
of software.

Refinement

• Refinement is a top-down design approach.


• It is a process of elaboration.
• A program is established for refining levels of procedural details.
• A hierarchy is established by decomposing a statement of function in a stepwise manner
till the programming language statement are reached.

Refactoring

• It is a reorganization technique which simplifies the design of components without changing its
function behaviour.
• Refactoring is the process of changing the software system in a way that it does not change the
external behaviour of the code still improves its internal structure.

Design classes

• The model of software is defined as a set of design classes.


• Every class describes the elements of problem domain and that focus on features of the problem
which are user visible.

12. Define Coupling and Cohesion. What is the difference between cohesion
and coupling.
Module Coupling
In software engineering, the coupling is the degree of interdependence between software
modules. Two modules that are tightly coupled are strongly dependent on each other. However,
two modules that are loosely coupled are not dependent on each other. Uncoupled
modules have no interdependence at all within them.

The various types of coupling techniques are shown in fig:

12
A good design is the one that has low coupling. Coupling is measured by the number of
relations between the modules. That is, the coupling increases as the number of calls between
modules increase or the amount of shared data is large. Thus, it can be said that a design with
high coupling will have more errors.

Module Cohesion

In computer programming, cohesion defines to the degree to which the elements of a


module belong together. Thus, cohesion measures the strength of relationships between
pieces of functionality within a given module. For example, in highly cohesive systems,
functionality is strongly related.

Cohesion is an ordinal type of measurement and is generally described as "high cohesion" or


"low cohesion."

13. What is the importance of class model? Prepare the class model for a
web-based order-processing system for a computer store.
Class model is considered important as it represents the graphical representation of the entire
system and helps in analysis while communicating with the customers. The motive behind
constructing the class model is to concentrate on those concepts of real world that are important from
the application point of view.

13
14
14.What are the elements of a behavioral model? Prepare use case diagram
and sequence diagrams for ATM system of a bank.
In software engineering, behavioural model describes the overall behaviour of the system.
There are two types of behavioural models that are used to describe the system behaviour
Sequence Diagram for ATM system of a bank

15
Bank ATM
UML Use Case Diagram Examples
An automated teller machine (ATM) or the automatic banking machine (ABM) is a banking
subsystem that provides bank customers with access to financial transactions in a public space
without the need for a cashier, clerk, or bank teller.
Customer uses bank ATM to Check Balances of his/her bank accounts, Deposit
Funds, Withdraw Cash and/or Transfer Funds. ATM
Technician provides Maintenance and Repairs. All these use cases also involve Bank actor
whether it is related to customer transactions or to the ATM servicing.

An example of use case diagram for Bank ATM subsystem - top level use cases.
On most bank ATMs, the customer is authenticated by inserting a plastic ATM card and
entering a personal identification number (PIN). Customer Authentication use case is required
for every ATM transaction so we show it as include relationship. Including this use case as
well as transaction generalizations make the ATM Transaction an abstract use case.

Bank ATM Transactions and Customer Authentication Use Cases Example.


Customer may need some help from the ATM. ATM Transaction use case
is extended via extension point called menu by the ATM Help use case whenever ATM
Transaction is at the location specified by the menu and the bank customer requests help, e.g.
by selecting Help menu item.

16
Bank ATM Maintenance, Repair, Diagnostics Use Cases Example.
ATM Technician maintains or repairs Bank ATM. Maintenance use case
includes Replenishing ATM with cash, ink or printer paper, Upgrades of hardware, firmware
or software, and remote or on-site Diagnostics. Diagnostics is also included in (shared
with) Repair use case.

15. What are the different types of Cohesion?

Types of Modules Cohesion

1. Functional Cohesion: Functional Cohesion is said to exist if the different elements of


a module, cooperate to achieve a single function.
2. Sequential Cohesion: A module is said to possess sequential cohesion if the element
of a module form the components of the sequence, where the output from one
component of the sequence is input to the next.
3. Communicational Cohesion: A module is said to have communicational cohesion, if
all tasks of the module refer to or update the same data structure, e.g., the set of
functions defined on an array or a stack.
4. Procedural Cohesion: A module is said to be procedural cohesion if the set of purpose
of the module are all parts of a procedure in which particular sequence of steps has to
be carried out for achieving a goal, e.g., the algorithm for decoding a message.
5. Temporal Cohesion: When a module includes functions that are associated by the fact
that all the methods must be executed in the same time, the module is said to exhibit
temporal cohesion.
6. Logical Cohesion: A module is said to be logically cohesive if all the elements of the
module perform a similar operation. For example, Error handling, data input and data
output, etc.
7. Coincidental Cohesion: A module is said to have coincidental cohesion if it performs
a set of tasks that are associated with each other very loosely, if at all.

17

You might also like