Post-notes on SDM Lab 3: More with Papyrus (partially updated 8/10/19)
Here are two projects that I built last year following the lab
instructions, on an up to date Papyrus installation but at home on a
Windows 10 machine.
Note there is an error in the multiplicities in the class diagram,
which I wish I could say I put there deliberately to test you... but since
it's there, see if you can spot it. See Piazza if you
need help.
You should be able to have a look at them using the following procedure
(there are other ways too). Please let me know if you try this and it
doesn't work.
- Download both the zipped projects and unzip them, giving directories
studentRegistration and studentRegistrationCode.
- Start Eclipse Modeling, picking a new, clean workspace. (By the way,
for purposes of this course, I would recommend always starting with a new,
clean workspace unless you're deliberately continuing with a piece of work.
It's easier to keep straight than using multiple unrelated projects in one
workspace.)
- Use menu option File, then Open projects from file system, to navigate
to your directories. Import each of the projects separately.
Things to note:
- I had trouble getting anything sensible shown on the return arrows in
my sequence diagram, and have not yet got to the bottom of the matter. You
do not have to show anything on a return arrow; if you do show anything,
the usual thing to show would be the actual value returned.
- Going round the lab (in 2018!) I saw some of you had lifelines that weren't
correctly labelled: that may be related to the Papyrus problems. Mine are
labelled, for example, :Student. This means that the lifeline represents
the behaviour of an unnamed instance of class Student.
- Note the use of nested activations in the sequence diagram, and how
this corresponds to my Java code for class Course.
- As previously remarked, name of use case should not be underlined:
it's a classifier, not an instance.
Here are images of the diagrams and a few notes on problems with them:
Spot the multiplicity error - also, are the types of the operations right?
Use case name should not be underlined: that corresponds to an old Papyrus
bug.
Sequence diagram should be set off by an actor instance, but the old
version of Papyrus did not permit that.
This page is maintained by
Perdita Stevens (
perdita@inf.ed.ac.uk
)