Presentation is loading. Please wait.

Presentation is loading. Please wait.

Classes, Sequence Diagrams and Triangulation

Similar presentations


Presentation on theme: "Classes, Sequence Diagrams and Triangulation"— Presentation transcript:

1 Classes, Sequence Diagrams and Triangulation

2 Simple Class Diagram

3 Relationship Between Layers
Presentation (Use cases) Middle (Classes) Data (Entities)

4 A Single Class Class name Attributes (Properties) Operations (Methods)

5 Starting from the Event Table
Subject Verb Object Response User Views Address List Addresses are listed by the system Filters Address list is filtered based on pattern Adds Address Address is added to the system Updates Address is updated on the system Deletes Address is deleted from the system System Validates Address data is accepted or error is displayed

6 Starting from the Scenario
At the end of each year students have purchased a number of books that are surplus to requirements by the end of the year / course. In order to recycle the books and possibly make a little money a system is required allowing students to sell their books on to students following them on lower years. The application will be web based allowing students to access sales and account details at home. Students will sign up to the site providing contact details. Once authenticated on the system a student will be able to add books that they no longer require. Initially books will be viewable only to the student themselves. To sell on a book the student must take the book to the book shop on the ground floor of Gateway house. The book will be handed to the system administrator (Brenda) who will place the book into stock, provide a receipt for the student and then flag the book on the system as “in stock”. Now that the book is in stock it is visible to other students on the system who may reserve the book for collection. Once reserved the purchasing student must visit the book shop and pay for the book. They will be issued with the book along with a receipt or they have the option of cancelling the transaction if the book was not what they expected (wrong edition of poor condition). As soon as the transaction is completed the seller of the book is notified. They need to visit the bookshop to claim the money paid by the buyer. Identify the nouns

7 How do we find Associations?
Subject Verb Object Response Consultant Inputs Card Data accepted by the system System Checks Identifying duplicates Updates New data input Clues may be found looking at subjects and Object

8 Multiplicity how many of one class may be used by another class

9 Composition (Has relationship)
Can an order line exist without an order? No – so we indicate a strong relationship Order Order Line Has 1 0..* Attributes Operations Order Order Line Has 1 0..* Attributes Operations

10 Aggregation (Uses relationship)
Can an address exist without a customer? Yes - so we express this with a clear diamond Customer Address Uses 1 1..* Attributes Operations Customer Address Uses 1 1..* Attributes Operations

11 Don’t Forget Collection Classes
1 Collection class allows you to manage many instances of the item class A good starting point is to consider 1 table needs 2 classes to control it

12 Triangulation Not a simple linear process
Class Designs Use Cases Sequence Diagram Not a simple linear process Things we discover later shed light on what we thought we knew previously

13 The Use Case Diagram

14 The Class Diagram

15 First go at the Sequence Diagram
Actors Objects Swim lines Messages

16 Important Questions to Ask
Do we have an actor on the use case that matches the sequence diagram? Yes! Do we have a class that allows us to create the Companies object? Yes! Do we have methods in the class that are able to handle the messages? FilterByCompanyName – yes FilterByCompanyNo - no

17 The Sequence Diagram Allows us to cross check our use cases and classes The smoke and mirrors prototype informs this process Need to think in terms of what objects support our use cases…

18 The Process Uncertain at first Discuss your products with each other
Develop Individual Event Tables Draw up initial use cases class diagrams Sequence diagrams Do they triangulate?


Download ppt "Classes, Sequence Diagrams and Triangulation"

Similar presentations


Ads by Google