UNIT 3
Software Design
a) Data coupling
The dependency between module A and B is said to be data coupled if their dependency is based on the fact they communicate by only passing of data. Other than communicating through data, the two modules are independent
b) Stamp coupling
Stamp coupling occurs between module A and B when complete data structure is passed from one module to another.
c) Control coupling
Module A and B are said to be control coupled if they communicate by passing of control information. This is usually accomplished by means of flags that are set by one module and reacted upon by the dependent module.
d) Common coupling
With common coupling, module A and module B have shared data. Global data areas are commonly found in programming languages. Making a change to the common data means tracing back to all the modules which access that data to evaluate the effect of changes.
e) Content coupling
Content coupling occurs when module A changes data of module B or when control is passed from one module to the middle of another. In fig. module B branches into D, even though D is supposed to be under the control of C.
2. Explain Cohesion and its types.
Solution: It is a measure of the degree to which the elements of a module are functionally related
Types of cohesion
Functional cohesion:
A and B are part of a single functional task. This is very good reason for them to be contained in the same procedure.
Sequential Cohesion
Module A outputs some data which forms the input to B. This is the reason for them to be contained in the same procedure.
Procedural Cohesion
Temporal Cohesion
Logical Cohesion
Logical cohesion occurs in modules that contain instructions that appear to be related because they fall into the same logical class of functions.
Coincidental Cohesion
Coincidental cohesion exists in modules that contain instructions that have little or no relationship to one another.
Relationship between Cohesion & Coupling
Fig. View of cohesion and coupling
If the software is not properly modularized, a host of seemingly trivial or changes will result into death of the project Therefore, a software engineer must design the modules with goal of high cohesion and low coupling
3. What is data modelling?
Solution: Data modelling is the act of exploring data-oriented structures. Like other modelling artifacts data models can be used for a variety of purposes, from high-level conceptual models to physical data models. From the point of view of an object-oriented developer, data modelling is conceptually similar to class modeling. With data modeling you identify entity types whereas with class modeling you identify classes. Data attributes are assigned to entity types just as you would assign attributes and operations to classes. Examples for data modeling include:
• Entity-Relationship diagrams
• Entity-Definition reports
• Entity and attributes report
• Table definition report
• Relationships, inheritance, composition and aggregation.
4. What is a modularity?
Modularity is a software design and architecture pattern achieved by dividing the software into uniquely named and addressable components, which are also known as modules. The basic idea underlying modular design is to organize a complex system (large program) into a set of distinct components, which are developed
Independently and then are connected together. This may appear as a simple idea however, the effectiveness of the technique depends critically on the manner in which the systems are divided into components and the mechanisms used to connect components together. Modularising a design helps to plan the development in a more effective manner, accommodate changes easily, conduct testing and debugging effectively and efficiently, and conduct maintenance work without adversely affecting the functioning of the software. Figure shows modularity.
5. Elaborate Object oriented design
Solution: Object oriented design is the result of focusing attention not on the function performed by the program, but instead on the data that are to do manipulated by the program Thus, it is orthogonal to function oriented design. It starts with an examination of the real world “things” that are part of the problem to be solved These things (which we will call objects) are characterized individually in terms of their attributes and behaviour.
Basic Concepts on which Objects are based:
6. What is the importance of Structured Analysis?
Solution: Structured Analysis is a data analysis and development tool that allows the analyst to understand the system and its functional activities in a detailed logical manner. It is a systematic approach, using graphical tools that analyse and summarize objectives of an existing system to develop new system specification which are easy to decipher by users.
The properties of structured analysis are:
Structured Analysis Tools
7. Explain UML Diagrams & Design patterns
The UML stands for Unified modelling language, is a standardized visual modelling language used for specifying and visualizing to construct, and document a primary artifacts of the software system. It helps in Object oriented designing and characterizing of system. It explains both software and hardware working of systems.
UML-Building Blocks
UML is composed of three main building blocks. The basic UML building blocks are summarized in block diagram.
It has a collection of five types of views:
A UML DIAGRAM
8. What is Structured Analysis? How it represented?
Structured analysis is a top-down approach, which focuses on refining the problem with the help of functions performed in the problem domain and data produced by these functions.
The basic principles of this approach are:
Generally, structured analysis is represented using data flow diagram.
IEEE defines data flow diagram (also known as bubble chart or work flow diagram) as “a diagram that depicts data sources, data sinks, data storage, and processes performed on data as nodes, and logical flow of data as links between the nodes”.
DFD comprises of four basic notations (symbols), which help to depict information in a system. These notations are listed in Table.