Software Engineering-unit-3

 

UNIT-3

 

Software Design Process – Software Engineering

 

The design phase of software development deals with transforming the customer requirements as described in the SRS documents into a form implementable using a programming language. The software design process can be divided into the following three levels or phases of design:

·       Interface Design

·       Architectural Design

·       Detailed Design

Elements of a System

Architecture: This is the conceptual model that defines the structure, behavior, and views of a system. We can use flowcharts to represent and illustrate the architecture.

Modules: These are components that handle one specific task in a system. A combination of the modules makes up the system.

Components: This provides a particular function or group of related functions. They are made up of modules.

Interfaces: This is the shared boundary across which the components of a system exchange information and relate.

Data: This is the management of the information and data flow.

 

Interface Design

Interface design is the specification of the interaction between a system and its environment. This phase proceeds at a high level of abstraction with respect to the inner workings of the system i.e, during interface design, the internal of the systems are completely ignored, and the system is treated as a black box. Attention is focused on the dialogue between the target system and the users, devices, and other systems with which it interacts. The design problem statement produced during the problem analysis step should identify the people, other systems, and devices which are collectively called agents.

1.     Precise description of events in the environment, or messages from agents to which the system must respond.

2.     Precise description of the events or messages that the system must produce.

 

 

 

 

Architectural Design

Architectural design is the specification of the major components of a system, their responsibilities, properties, interfaces, and the relationships and interactions between them. In architectural design, the overall structure of the system is chosen, but the internal details of major components are ignored. Issues in architectural design includes:

1.     Gross decomposition of the systems into major components.

2.     Allocation of functional responsibilities to components.

3.     Component Interfaces.

Detailed Design

Detailed design is the specification of the internal elements of all major system components, their properties, relationships, processing, and often their algorithms and the data structures. The detailed design may include:

1.     Decomposition of major system components into program units.

2.     Allocation of functional responsibilities to units.

3.     User interfaces.

4.     Unit states and state changes.

5.     Data and control interaction between units.

6.     Data packaging and implementation, including issues of scope and visibility of program elements.

7.     Algorithms and data structures.

 

How to characterize a good software design?

 

Software is treated as good software using different factors. A software product is concluded as good software by what it offers and how well it can be used. The factors that decide the software properties are divided into three categories: Operational, Transitional, and Maintenance.

What is Good Software?

Software engineering is the process of designing, developing, and maintaining software systems. Good software meets the needs of its users, performs its intended functions reliably, and is easy to maintain.

1.     There are several characteristics of good software that are commonly recognized by software engineers, which are important to consider when developing a software system.

2.     These characteristics include functionality, usability, reliability, performance, security, maintainability, reusability, scalability, and testability. 

Categories of Software Characteristics

1. Operational

In operational categories, the factors that decide the software performance in operations. It can be measured on:

·        Budget

·        Usability

·        Efficiency

·        Correctness

·        Functionality

·        Dependability

·        Security

·        Safety

2. Transitional

When the software is moved from one platform to another, the factors deciding the software quality:

·        Portability

·        Interoperability

·        Reusability

·        Adaptability

3. Maintenance

In this categories all factors are included that describes about how well a software has the capabilities to maintain itself in the ever changing environment:

·        Modularity

·        Maintainability

·        Flexibility

·        Scalability

Characterisitics of Good Software

1.     Functionality: The software meets the requirements and specifications that it was designed for, and it behaves as expected when it is used in its intended environment.

2.     Usability: The software is easy to use and understand, and it provides a positive user experience.

3.     Reliability: The software is free of defects and it performs consistently and accurately under different conditions and scenarios.

4.     Performance: The software runs efficiently and quickly, and it can handle large amounts of data or traffic.

5.     Security: The software is protected against unauthorized access and it keeps the data and functions safe from malicious attacks.

6.     Maintainability: The software is easy to change and update, and it is well-documented, so that it can be understood and modified by other developers.

7.     Reusability: The software can be reused in other projects or applications, and it is designed in a way that promotes code reuse.

8.     Scalability: The software can handle an increasing workload and it can be easily extended to meet the changing requirements.

9.     Testability: The software is designed in a way that makes it easy to test and validate, and it has a comprehensive test coverage.

 

Layered arrangement of modules in software engineering

Software engineering is a fully layered technology, to develop software we need to go from one layer to another. All the layers are connected and each layer demands the fulfillment of the previous layer.

Fig: The diagram shows the layers of software development

Layered technology is divided into four parts:

1. A quality focus: It defines the continuous process improvement principles of software. It provides integrity that means providing security to the software so that data can be accessed by only an authorized person, no outsider can access the data. It also focuses on maintainability and usability.

2. Process: It is the foundation or base layer of software engineering. It is key that binds all the layers together which enables the development of software before the deadline or on time.  Process defines a framework that must be established for the effective delivery of software engineering technology. The software process covers all the activities, actions, and tasks required to be carried out for software development.

 

 

Process activities are listed below:-

Communication: It is the first and foremost thing for the development of software. Communication is necessary to know the actual demand of the client.

Planning: It basically means drawing a map for reduced the complication of development.

Modeling: In this process, a model is created according to the client for better understanding.

Construction: It includes the coding and testing of the problem.

Deployment:- It includes the delivery of software to the client for evaluation and feedback.

3. Method: During the process of software development the answers to all “how-to-do” questions are given by method. It has the information of all the tasks which includes communication, requirement analysis, design modeling, program construction, testing, and support.

4. Tools: Software engineering tools provide a self-operating system for processes and methods. Tools are integrated which means information created by one tool can be used by another.

Coupling and Cohesion – Software Engineering

The purpose of the Design phase in the Software Development Life Cycle is to produce a solution to a problem given in the SRS(Software Requirement Specification) document. The output of the design phase is a Software Design Document (SDD). 

What is Coupling and Cohesion?

Coupling refers to the degree of interdependence between software modules. High coupling means that modules are closely connected and changes in one module may affect other modules. Low coupling means that modules are independent, and changes in one module have little impact on other modules.

Cohesion refers to the degree to which elements within a module work together to fulfill a single, well-defined purpose. High cohesion means that elements are closely related and focused on a single purpose, while low cohesion means that elements are loosely related and serve multiple purposes.

 

 

Both coupling and cohesion are important factors in determining the maintainability, scalability, and reliability of a software system. High coupling and low cohesion can make a system difficult to change and test, while low coupling and high cohesion make a system easier to maintain and improve.

Basically, design is a two-part iterative process. The first part is Conceptual Design which tells the customer what the system will do. Second is Technical Design which allows the system builders to understand the actual hardware and software needed to solve a customer’s problem. 

 

Conceptual design ofthe system: 

·        Written in simple language i.e. customer understandable language.

·        Detailed explanation about system characteristics.

·        Describes the functionality of the system.

·        It is independent of implementation.

·        Linked with requirement document.

Technical Design of the System: 

·        Hardware component and design.

·        Functionality and hierarchy of software components.

·        Software architecture

·        Network architecture

·        Data structure and flow of data.

·        I/O component of the system.

·        Shows interface.

Modularization is the process of dividing a software system into multiple independent modules where each module works independently. There are many advantages of Modularization in software engineering. Some of these are given below: 

·        Easy to understand the system.

·        System maintenance is easy.

·        A module can be used many times as their requirements. No need to write it again and again.

Types of Coupling

Coupling is the measure of the degree of interdependence between the modules. A good software will have low coupling. 

Following are the types of Coupling:

 

·        Data Coupling: If the dependency between the modules is based on the fact that they communicate by passing only data, then the modules are said to be data coupled. In data coupling, the components are independent of each other and communicate through data. Module communications don’t contain tramp data. Example-customer billing system.

·        Stamp Coupling: In stamp coupling, the complete data structure is passed from one module to another module. Therefore, it involves tramp data. It may be necessary due to efficiency factors- this choice was made by the insightful designer, not a lazy programmer.

·        Control Coupling: If the modules communicate by passing control information, then they are said to be control coupled. It can be bad if parameters indicate completely different behavior and good if parameters allow factoring and reuse of functionality. Example- sort function that takes comparison function as an argument.

·        External Coupling: In external coupling, the modules depend on other modules, external to the software being developed or to a particular type of hardware. Ex- protocol, external file, device format, etc.

·        Common Coupling: The modules have shared data such as global data structures. The changes in global data mean tracing back to all modules which access that data to evaluate the effect of the change. So it has got disadvantages like difficulty in reusing modules, reduced ability to control data accesses, and reduced maintainability.

·        Content Coupling: In a content coupling, one module can modify the data of another module, or control flow is passed from one module to the other module. This is the worst form of coupling and should be avoided.

Types of Cohesion

Cohesion is a measure of the degree to which the elements of the module are functionally related. It is the degree to which all elements directed towards performing a single task are contained in the component. Basically, cohesion is the internal glue that keeps the module together. A good software design will have high cohesion. 

 

 

Following are the types of Cohesion:

·        Functional Cohesion: Every essential element for a single computation is contained in the component. A functional cohesion performs the task and functions. It is an ideal situation.

·        Sequential Cohesion: An element outputs some data that becomes the input for other element, i.e., data flow between the parts. It occurs naturally in functional programming languages.

·        Communicational Cohesion: Two elements operate on the same input data or contribute towards the same output data. Example- update record in the database and send it to the printer.

·        Procedural Cohesion: Elements of procedural cohesion ensure the order of execution. Actions are still weakly connected and unlikely to be reusable. Ex- calculate student GPA, print student record, calculate cumulative GPA, print cumulative GPA.

·        Temporal Cohesion: The elements are related by their timing involved. A module connected with temporal cohesion all the tasks must be executed in the same time span. This cohesion contains the code for initializing all the parts of the system. Lots of different activities occur, all at unit time.

·        Logical Cohesion: The elements are logically related and not functionally. Ex- A component reads inputs from tape, disk, and network. All the code for these functions is in the same component. Operations are related, but the functions are significantly different.

·        Coincidental Cohesion: The elements are not related(unrelated). The elements have no conceptual relationship other than location in source code. It is accidental and the worst form of cohesion. Ex- print next line and reverse the characters of a string in a single component.

Advantages of low coupling

·        Improved maintainability: Low coupling reduces the impact of changes in one module on other modules, making it easier to modify or replace individual components without affecting the entire system.

·        Enhanced modularity: Low coupling allows modules to be developed and tested in isolation, improving the modularity and reusability of code.

·        Better scalability: Low coupling facilitates the addition of new modules and the removal of existing ones, making it easier to scale the system as needed.

Advantages of high cohesion

·        Improved readability and understandability: High cohesion results in clear, focused modules with a single, well-defined purpose, making it easier for developers to understand the code and make changes.

·        Better error isolation: High cohesion reduces the likelihood that a change in one part of a module will affect other parts, making it easier to

·        Improved reliability: High cohesion leads to modules that are less prone to errors and that function more consistently, 

·        leading to an overall improvement in the reliability of the system.

 

it’s good for software to have low coupling and high cohesion. Low coupling means the different parts of the software don’t rely too much on each other, which makes it safer to make changes without causing unexpected problems. High cohesion means each part of the software has a clear purpose and sticks to it, making the code easier to work with and reuse. Following these principles helps make software stronger, more adaptable, and easier to grow.

Comments

Popular posts from this blog

Software Engineering unit- 3- part-b

Software Engineering unit-2