Homework Assignment 5 & 6
|
HW5: Wednesday, May 31, 2000, 11am HW6: Wednesday, June 7, 2000, 11am |
The reader for your design will be computer professional. Neither the user nor the client will read it. This time you should think as a computer professional and develop a solution satisfying both the requirements and the client's and users' needs, using relevant software engineering concepts and solutions you learned from this class.
Your solution only needs to cover the three tasks specified in homework 4:
To identify classes, refer to both the task descriptions above and the initial description of Virtual Mall Online in assignment 1 plus any of the requirements analysis done since then. Use the techniques suggested in your text book and lecture, such as identifying nouns/verbs, entities, etc. For each class, provide its name and identify its major attributes (do NOT identify methods at this point), along with a short description of the class. Also, identify the major relationships among the classes you identify, including inheritance, aggregation, and associations. You will describe each class in more detail in homework 6 (in particular, you will identify all methods and potentially additional necessary attributes then).
Next, draw collbaration diagrams for the three tasks in homework 4.
(For task 3, the collaboration diagram should show an employee both adding
and deleting a product.)
These diagrams should show how the classes you identify collaborate
to accomplish the three tasks. Show the messages sent between the classes,
numbering the messages to indicate the order in which they occur.
If it helps you to draw a sequence diagram by hand (or using a simple drawing
tool) first, please feel free to do so. You can even turn it in to
show your thought process.
Now, draw ONE state diagram for task #3. This state diagram should handle both adding and removing a product (in either order).
Finally, create an integration test plan based upon your solution to
test the class interactions as they are integrated. You should use the
collaboration diagrams as your guide for creating the test plan, since
they describe the communication and interaction between the classes. You
must also specify an order for integration by indicating the order to execute
the test cases.
Describe each test case in the following way: classes and interactions
(messages) covered, input description, expected output.
A complete homework will include:
Title Page, including name and student id.Class diagrams: class diagrams (showing name and major attributes only for each class) including relationships (inheritance, aggregation, association) in your diagram (you can divide into several diagrams if all classes do not fit onto one page) followed by brief text descriptions for each class after the diagram(s).
Collaboration diagrams: one collaboration diagram for each task, showing the messages sent between classes, numbered by their order.
State diagram: one state diagram to cover task 3.
Integration test plan: test cases for the class interactions and order of testing during integration.
First, refine your class diagrams. You may add/remove classes, add/remove attributes, add methods, and add/remove relationships among the classes.
Refine your description of each class by providing details as described below. After a short description of its purpose, provide detailed descriptions of each attribute and method. You can use following Java-like template as basis for your description ( you don't have to be as complete as you would in developing a Java program, just show the details of the MAJOR ones):
class Name [extends Superclass] {
/*
short description of class: its purpose, its IMPORTANT
relationship with other classes
*/
type attributeName;
/*
description of attribute
/*
returnType methodName(parameterList);
/*
description of the method,
including major steps of the algorithm
*/
}
Pick the class you consider the most complex and draw a component-level state diagram for it. Show states, events, transitions, and actions.
Develop a module test plan for the class for which you drew the state
diagram. Describe how you will test each method in the class and any interactions
among the methods as well as an ordering for module testing. For each method,
design test cases cover both valid and invalid inputs.
Describe each test case in following way: class and method under test,
input description, expected output.
A complete homework will include:
Title Page inclding name and student id.Refined Class diagrams: class diagrams (for each class) and their relationships (again, you can include several diagrams if they do not fit into one page) followed by detailed class descriptions.
State Diagram: state diagram for your most complex class (NOTE: if you choose a less than complex class, you will be marked down).
Module Test Plan: test cases for each of the methods in the class selected above and order of testing.