Computer Science - Object Oriented Programming Using C++ - Discussion
Discussion Forum : Object Oriented Programming Using C++ - Section 2 (Q.No. 11)
11.
A constructor always has
Discussion:
3 comments Page 1 of 1.
.Ayesha... said:
3 years ago
A Module performs more than one function, and these are related by the fact that they must occur within the same time span.
Example:
Any single module program. For example a one-module command line program. Modules performing program initialization, termination, housekeeping and clean-up changes to this module may cause a ripple effect necessitating the change of modules that are not using the new functionality.
This ranks above logical cohesion because all of the elements are executed at each invocation.
Note:
A constructor method of a class does not necessarily exhibit temporal cohesion. A well-defined constructor has a definite purpose to initialize the attributes of the class and all of the elements are directed to that purpose.
Example:
Any single module program. For example a one-module command line program. Modules performing program initialization, termination, housekeeping and clean-up changes to this module may cause a ripple effect necessitating the change of modules that are not using the new functionality.
This ranks above logical cohesion because all of the elements are executed at each invocation.
Note:
A constructor method of a class does not necessarily exhibit temporal cohesion. A well-defined constructor has a definite purpose to initialize the attributes of the class and all of the elements are directed to that purpose.
Saba said:
3 years ago
Temporal cohesion: All of the components that are activated at a single time, such as start up or shut down, are grouped (cohesion) together.
Pradip said:
1 decade ago
1. "Coincidental cohesion: The parts of a component are not related but simply bundled into a single component.
2. Logical association: Components that perform similar functions such as input, error handling and so on are put together in a single component.
3. Temporal cohesion: All of the components that are activated at a single time, such as start up or shut down, are brought together.
4. Procedural cohesion: The elements in a component make up a single control sequence.
5. Communicational cohesion: All of the elements of a component operate on the same input data or produce the same output data.
6. Sequential cohesion: The output from one element in the component serves as input for some other element.
7. Functional cohesion: Each part of the component is necessary for the execution of a single function".
2. Logical association: Components that perform similar functions such as input, error handling and so on are put together in a single component.
3. Temporal cohesion: All of the components that are activated at a single time, such as start up or shut down, are brought together.
4. Procedural cohesion: The elements in a component make up a single control sequence.
5. Communicational cohesion: All of the elements of a component operate on the same input data or produce the same output data.
6. Sequential cohesion: The output from one element in the component serves as input for some other element.
7. Functional cohesion: Each part of the component is necessary for the execution of a single function".
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers