CMPUT 301

Software Engineering

B2 27th March Class Exercise


Class Participation Exercise

Design and create a sequence diagram for a system that allows users to customize a car using the decorator pattern. It might be helpful to sketch the class diagram, but it's not required, only the sequence diagram is required.

Use the decorator pattern to implement a simulator, a car and some upgrades that can be applied to the car. The car has some basic properties like model, color, speed, and price. A variety of upgrades are available such as a V8 engine, a turbocharger, a spoiler, and racing tires.

Make a sequence diagram that shows the interaction between the objects when it constructs a car with at least 2 upgrades and then computes its price.

Do not submit Java, submit UML Sequence Diagram.



Add your name and your partner's name (if you have one) to the diagram. If you don't, you won't get credit.

Upload a screenshot. If you worked in a pair, get the screenshot from your partner and upload the same screenshot.

You can screenshot a diagrammer of your choice, or draw it on paper and take a photo. Here's a handy diagrammer online: https://app.diagrams.net/ IF that one doesn't work for you, try a different one.