Segment View Design Overview
CSegmentView extends CScrollView, which is a subclass of CView. Both are
classes of the MFC library. The scrollbar functionality comes from CScrollView, and font
manipulation comes from the CFont class, of which CSegmentView owns an instance as
a member variable. The module is event-driven.
CSegmentView USES CString, CClientDC, CRect, CSegmentDoc, and CFont.
Coupling and Cohesion
A rough estimate shows that of 28 method calls in the module, 11 of
them are not calls within the Segment View Module or one of its parent classes.
This module functions only to display text. Within this, it adds the
functionality of scrolling and font control. In this sense, it is highly cohesive.
Breaking up the script, switching between segments, and any other functions that
would weaken the cohesion of the module are not implemented in SegmentView. They
are implemented in other modules.
Coupling score: 11 foreign calls = 4.10% overall.
Cohesion score: 7