Software Quality
Software Quality
Design Classes
Characteristics:
1. Complete and sufficient: A design class should be complete
encapsulation of all attributes and method that can be reasonably
be expected to exist for class. For example, the class scene defined
for video editing software is complete only if it contains all
attributes and methods that can agreeably be associated with the
creation of a video scene. Sufficiently ensure that design class
contains only those methods that are sufficient to achieve the
intent of class, no more and no less.
2. Primitiveness: Method associate with design class should be
focused on accomplishing one service for class. Once service
implemented with the method, the class should not provide
another way to accomplish the same thing. For example, the
class Video Clip for video editing software might have
attributes start point and end point to specify start and endpoint of
clip.
3. High Cohesion:/strong> A cohesion design class has a small,
concentrated set of authority and single-mindedly applies
attributes and methods to implement those responsibilities. For
example, the class video clip might contain set of method for
editing the video clip. As long as each method focus solely on
attributes associated with video clip, cohesion is maintained.
4. Low Coupling: Within the design model, it is necessary for design
classes to get together with one another. However, get together
should be kept to an acceptable minimum. If the design model is
highly coupled, the system is difficult to implement to test and to
maintain over time, In general, design classes within subsystem
should have only limited knowledge of other classes. This
restriction called the Law of Demeter, suggest that method should
only send message to methods in neighboring classes.