This assignment has three parts:
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();
}
Draw the UML communication diagram that corresponds to the following UML sequence diagram:

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.
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