Team LiB
Previous Section Next Section

Revisiting Requirements

In revisiting the SRS case study problem statement, we find that we've indeed missed one requirement, namely

Note?/td>

"The SRS will verify whether or not the proposed plan of study satisfies the requirements of the degree that the student is seeking."

We didn't model Degree as a class—recall that we debated whether or not to do so back in Chapter 10, and ultimately decided against it. Nor, for that matter, do we reflect the requirements of a particular degree program in our model. Let's look at what it would take to do so properly at this time.

Researching the way in which our university specifies degree program requirements, we learn the following:

Phew! To model all of these interdependencies would require a fairly complex class diagram structure, as shown in Figure 12-1.

Click To expand
Figure 12-1: Modeling degree program requirements proves to be rather complicated

We go back to our project sponsors—the future users of the SRS—and break the news to them that we've just uncovered a previously missed requirement that is going to significantly increase the complexity and cost of our automation effort. The sponsors decide that having the SRS verify the correctness of a student's plan of study is too ambitious a goal; they instead decide that a student will use the SRS to submit a proposed plan of study, but that his or her advisor will then be responsible for manually verifying and approving it. So, all we wind up having to do to correct our SRS class diagram as last presented is to add one attribute to the PlanOfStudy class, reflecting the date on which it was approved, and a new approves association connecting the Professor class to the PlanOfStudy class, and we're good to go!

Note that we don't need to add an ApprovePlan method to the PlanOfStudy class, because as discussed in Chapter 10 we may assume the presence of "set" methods for all attributes; the SetDateApproved method would suffice for marking a plan as approved. And, the approves association between the PlanOfStudy and Professor classes (see the diagram excerpt in Figure 12-2) ensures us that each PlanOfStudy object will maintain a handle on the Professor object who actually approved the plan on the date indicated.

Click To expand
Figure 12-2: Making minor adjustments to the SRS class diagram

Team LiB
Previous Section Next Section