Software Engineering — Lab 3

In this block we'll finally get into exploring Design Patterns. This, by implement patterns from the book and from the lectures as well as through using UML as notation for discussing design.

Deliverables

Please follow the below folder/file structure for the handin of this block.

    B3.zip
    1. Ex1
      1. Use-case-diagram.[png|jpg|gif|pdf]
    2. Ex2
      1. Class-diagram.[png|jpg|gif|pdf]
    3. Ex3
      1. ObserverPattern (VS solution)
    4. Ex4
      1. VisitorPattern (VS solution)
    5. Ex5
      1. CommandPattern (VS solution)
    6. Ex6
      1. Reverse-engineered.[png|jpg|gif|pdf]
    7. Ex7
      1. Re-engineered.[png|jpg|gif|pdf]

3.1 UML use case diagrams

Consider the below requirements for a library system. Identify the actors and construct a UML use case diagram.

3.2 UML class diagrams

Create a UML class diagram from the below description. Begin with a noun and verb analysis.

A customer wants to make an order from a retail catalog. The customer can make the payment in one of these three kinds: cash, cheque, or credit card. The order contains order details, each with its associated item. Each order carries the date in which it has been posted and its status (pending, delivered, etc).

3.3 Observer Pattern

Implement the Observer pattern as discussed in the lectures and the course book. In the context of the Weather Station Project. You will have to change the code from Java to C#. Add the Heat Index display element as described on page 61 of the course book.

3.4 Visitor Pattern

Consider the polymorphism example given in the lectures, where Employees are either Secretaries or Managers. Use the Visitor pattern to calculate the salary of employees.

3.5 Command Pattern

Use the command pattern example from the course book as inspiration, and implement the pattern for a different, but suitable, domain.

3.6 Reverse engineering with UML

Reverse engineer the graphical encryption/decryption system that you built in block one, using the UML class diagram notation. In other words, your task is to create a model of your implementation in UML.

3.7 Applying design patterns to existing code

When building the graphical encryption/decryption system in block 1, little attention was paid to design principles and patterns of software design. In this exercise you are to systematically analyze your chat system and make changes to the design.

Refactor your UML representation created in the previous exercise, by introducing patterns and principles as you see fit. Be sure to at least consider all patterns discussed in this course.