Augustana Campus, University of Alberta

COMPUTING SCIENCE 220
Software Engineering and Human-Computer Interfaces


Assignment 3 - UML Interaction Diagrams



Due Date: Thursday, November 8, by the start of the lab session

Objectives

Assignment

This assignment has three parts:

  1. Draw the UML sequence diagram that corresponds to the following Java code excerpt:

       void reserve( Order o )
       {
          OrderPosition opos;
          Article article;
          int number;
    
          for ( int i = 1; i < o.number(); i++ )
          {
             opos = o.getOrderPosition(i);
             article = opos.getArticle();
             number = opos.getNumber();
             articleStock.reserve( article, number );
          }
    
          articleStock.commit();
       }
    

  2. Draw the UML communication diagram that corresponds to the following UML sequence diagram:

  3. Write the code for the Java method processOrder as specified by the sequence diagram above. Place it within the appropriate class, and include any attributes and methods that also belong to that class that are needed by the processOrder method. You do not have to provide all the code for the other methods in the class — just method signatures will suffice.

Submission

Submit the diagram and Java code in hard-copy form by the beginning of the lab session on the due date. Late submissions will be assessed a penalty of 1% per hour.

Copyright © 2005, 2007 Jonathan Mohr