ICS 121 Software Engineering - Methods & Tools Spring 2000

Homework Assignment 5 & 6

Due: 

HW5: Wednesday, May 31, 2000, 11am

HW6: Wednesday, June 7, 2000, 11am

Object-Oriented Design, Part I & Part II

Description

The purpose of these two assignments is to design a solution for Virtual Mall Online using UML. To make your work more manageable and increase your chance of success, the design is split into two parts. The first part, homework 5, is to develop an architectural design. The second part, homework 6 is a more detailed design developed by extending and refining of the first part.  For homework 5, you will produce initial class diagrams, develop collaboration diagrams for a subset of the class interactions and a system-level state diagram, and create an integration test plan. For homework 6, you will refine your class diagrams, develop class-level state diagrams, and create a unit test plans. You should use Argo/UML to draw the diagrams: class diagrams, collaboration diagrams, and state diagrams.

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:

  1. A customer making a purchase on Virtual Mall Online
  2. A customer setting up preferences for their personal shopping page
  3. An employee adding or removing a product from Virtual Mall Online
Note that you don't have to cover all the functionalities you might have specified in homework1. However, your design should still be general so that the architecture easily accomodates additional functionality. Thus, you would be able to handle other related tasks with your solution easily, without requiring major re-architecting or re-design.

Homework 5

For this homework, you determine a set of initial classes, describe their interactions, and create integration test plans.

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.

Homework 6

For this homework, you will refine the classes you identified in homework 5 with more details, draw a class-level state diagram for the most complex class, and create module test plans. Make sure you correct any mistakes you may made in previous homework of which you are aware. Incorporate the lessons you learned (from professor, from TA, from classmates) after the previous homework.

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.