Common coupling, Communicational cohesion, Class diagram, Structure chart

Explain the following with the help of an example
(i)            Common coupling
(ii)          Communicational cohesion
(iii)         Class diagram
(iv)         Structure chart

1. Common coupling: Common coupling is when two modules share the same global data (e.g. a global variable). Changing the shared resource implies changing all the modules using it. Diagnosing problems in structures with considerable common coupling is time consuming and difficult. However, this does not mean that the use of global data is necessarily”bad”. It does not mean that a software designer must be aware of potential consequences of common coupling and take special care to guard against them.

2. Communicational cohesion: Communicational cohesion is when parts of a module are grouped because they operate on the same data (e.g. a module which operates on the same record of information). In this all of the elements of a component operate on the same input data or produce the same output data. So we can say if a module performs a series of actions related be a sequence of steps to be followed by the product and all actions to be performed on the same data.

3. Class diagram: A class diagram in the Unified Modeling Language (UML) is a type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, and the relationships between the classes. The UML specifies two types of scope for members: instance and classifier. In the case of instance members, the scope is a specific instance. For attributes, it means that its value can vary between instances. For methods, it means that its invocation affects the instance state, in other words, affects the instance attributes. Otherwise, in the classifier member, the scope is the class. For attributes, it means that its value is equal for all instances. For methods, it means that its invocation do not affect the instance state. Classifier members are commonly recognized as "static" in many programming languages.

4. Structure chart: A structure chart is a top-down modular design tool, constructed of squares representing the different modules in the system, and lines that connect them. The lines represent the connection and or ownership between activities and sub activities as they are used in organization charts.
In structured analysis structure charts are used to specify the high-level design, or architecture, of a computer program. As a design tool, they help the programmer in dividing and conquering a large software problem, that is, recursively breaking a problem down into parts that are small enough to be understood by a human brain. A structure chart depicts
• The size and complexity of the system.
• Number of readily identifiable functions and modules within each function.
• Whether each identifiable function is a manageable entity or should be broken down into smaller components.

No comments:

Post a Comment