ICS 52: Introduction to Software Engineering
Fall, 2007
Homework 2: Design and Class Interfaces
Class diagram and one class interface drafts due: Friday, Nov. 9, 2007, at 1:00 pm
Final and complete homework due: Friday, Nov. 16, 2007, at 1:00 pm
SUMMARY
Pretend that the Requirements Document
you submitted for Assignment 1 has been received and reviewed by
your Customer. You and your Customer have since successfully negotiated
a revised
Official Requirements Document.
Note that there are
some significant differences between the negotiated document and
the original one you submitted.
Make sure you carefully read the Official Requirements Document
before starting on this homework.
Your task is now to implement
the Schocr
system described in the Official Requirements. This will be
accomplished by first constructing a software architecture which
decomposes the system into modules, and then by defining
the module interfaces.
As you construct the Schocr system's architecture,
you should be guided by
two principal design criteria: information hiding and planning for a
family of related applications (as described in the "Future Directions
and Expected Changes" section of the Official Requirements).
The architecture and class interface design should be clear,
easy to understand, easy to implement, easy to change.
A design that "just works"
but is not consistent with the design principles presented in class
will not get full credit.
Apply the software engineering
principles introduced in the lectures, particularly
modularity based on information hiding.
Complete the assignment by yourself.
Do not work in teams on this assignment.
ASSIGNMENT DETAILS
You will probably have about a dozen classes in your system.
Each class will encapsulate some implementation detail or design
decision.
Each class will have an interface that defines the functionality
and services it provides to other classes.
For this homework you will identify the classes in your system and
define their interfaces.
Part of the assignment is to turn in drafts of your
class diagram and one class interface specification
at the start of lecture on
Friday, Nov. 9, 2007.
The drafts should reflect serious thought, but they will
not be graded and you can make any changes you see fit in your
final version turned in on Friday, Nov. 16.
You will not turn in an electronic copy of this homework.
Turn in the paper document promptly at 1:00 pm at the start of
lecture on Friday, Nov. 16.
Your document should be stapled or
bound at the left margin.
At the front of your homework put the attached cover sheet.
Your document for homework 2 should have the following sections:
- Cover Sheet (attached).
- Table of Contents with page numbers.
- Introduction.
Provide a brief overview of the system, from the point of view of
the system architect.
Discuss the architectural style of the system, using one or
more of the styles discussed in lecture.
The purpose of this section is to give the reader a clear
sense of the overall design and architecture of the system,
how the classes will fit together,
and the fundamental choices you made.
- Design Rationale.
List between seven and twelve important design decisions or procedures
that your design encapsulates or hides in classes.
Describe why each "secret" is important, and name the class
that encapsulates it.
- Class Diagram.
Follow the general style of Figures 12.3, 12.4, and 12.5 in the textbook.
More detail and examples will be provided in discussion.
To create the diagram you may use any software you are
familiar with, or you are welcome to draw it neatly by hand.
- Class Interface Specifications.
For every class in your design, specify its interface.
Each class specification describes:
- The purpose of the class.
What part of the Official Requirements
does it address? Use the "A-1" type identifiers to
reference the Official Requirements document. Describe
the rationale for constructing this class, including any
secrets it encapsulates.
- The class's interface.
What services does the class
provide (export) to client classes? Describe the interface
by listing public method prototypes with descriptive names.
If the class's interface includes public variables, list them as well.
Describe each interface element clearly, and list one or more
clients which will use it.
For instance,
public int compare(String s1, String s1);
// Returns -1 if s1 is shorter (has fewer characters) than s2,
// 0 if s1 and s2 are the same length, 1 otherwise.
// Client: class Book's method alphabetize().
- Any other information that will aid in the understanding of
the class, such as its parent in an inheritance hierarchy,
or performance constraints on the class or one of its
methods.
Your interface specification should be precise enough that any
correct implementation of the class will integrate with the rest of the system.
- Integration Test Plan.
Provide a plan to incrementally test classes and collections of classes,
with a focus on ensuring compatible interfaces.
Describe your general approach (e.g. top-down) and what additional
code or programs will have to be written to support the testing.
Even if your Integration Test Plan is not complete, make sure
that it is specific regarding a subset of classes and test cases.
ICS52 - Fall, 2007 - Homework 2
Student Name (Last, First):
Student Number:
| Awarded Points | Available Points |
|   | 5 | Document Structure and TOC
|
|   | 10 | 3) Introduction
|
|   | 10 | 4) Design Rationale
|
|   | 20 | 5) Class Diagram
|
|   | 50 | 6) Class Interface Specifications
|
|   | 5 | 7) Integration Test Plan
|
|   |
| (-10 if drafts not turned by 12:00 noon 11/9)
|
|   | 100 | TOTAL
| |