Presentation is loading. Please wait.

Presentation is loading. Please wait.

Systems Analysis and Design I

Similar presentations


Presentation on theme: "Systems Analysis and Design I"— Presentation transcript:

1 Systems Analysis and Design I
Group Project Tutorial: Online Shopping Based on Chapter 10 of Maciaszek, L.A.: Requirements Analysis and System Design (3rd edition) Addison Wesley, 2007

2 Purposes Exemplify the most important models and processes in the IS development Demonstrate some software development artefacts as an integrated set and show how they all fit together The explanations are based on a single application domain (online shopping) Suggestion: go through what we have learned to reinforce the knowledge you have gained

3 Outline Part 0: Background (Week 5)
Part 1: Use Case modelling (Week 7) Part 2: Activity Modelling (Week 8) Part 3: Class Modelling (Week 10) Part 4: Interaction Modelling (Week 11)

4 Part 0: Background

5 Online Shopping: Background (1)
Buying computers over the Internet using the manufacturer’s web page A concrete example: Computers classified into servers, desktops and laptops Customer can select standard configuration or can configure their own configuration For each new configuration, the system can calculate its price To place an order, the customer must fill in shipment and payment information

6 Online Shopping: Background (2)
The system sends a confirmation message to the customer with details of the order Customer can check the order status online at any time Moreover, the system needs to verify the customer’s credentials and payment methods request the ordered configuration from the warehouse print an invoice request the warehouse to ship the computer to the customer

7 Functional requirements (1)
The customer uses the manufacturer’s online shopping web page to view the standard configuration of the chosen server, desktop or laptop. The price is also shown. The customer chooses to view the details of the configuration, perhaps with the intention of buying it as is or to build a more suitable configuration. The price for each configuration can be computed on customer’s request. The customer may choose to order a computer online or request a salesperson to contact them to explain details of the order, negotiate the price and so on before the order is actually placed. To place an order, the customer must fill in the online form with shipment and invoice address and payment details (credit card or cheque). 7

8 Functional requirements (2)
5. After the customer’s order has been entered into the system, the salesperson sends an electronic request to the warehouse with details of the configuration ordered. 6. The details of the transaction, including the order number and the customer account number, are ed to the customer so that they can check the status of the order online. 7. The warehouse obtains the invoice from the salesperson and ships the computer to the customer. Exercises

9 Exercises (1) Use Case Modelling
[Step 1] Find actors from the above requirements. [Step 2] Find use cases from the above requirements. [Step 3] Draw a use case diagram for the online shopping application. [Step 4] Write a use case description for the use case “Order configured computer”. Use your general knowledge of typical order processing tasks to derive details not stated in the requirements. Activity Modelling [Step 5] Find actions from the above use case description. [Step 6] Draw an activity diagram for the use case “Order configured computer”.

10 Exercises (2) Class Modelling
[Step 7] Find entity classes from the above requirements. [Step 8] Think about the attributes for the above classes. Consider only attributes with primitive types. [Step 9] Add associations to the class model. Consider what access paths between these classes are required by the use cases. [Step 10] Add aggregations or compositions to the class model. [Step 11] Add generalizations to the class model. Consider how you can extract any common attributes in the existing classes into a high-level class. [Step 12] Draw a class diagram for the online shopping application. Modify the attribute content of classes as necessary due to the introduction of the generalisation hierarchy.

11 Exercises (3) Interaction Modelling
[Step 13] Draw a sequence diagram for the action “Display current configuration”. [Step 14] Convert the above sequence diagram into a communication diagram. [Step 15] Add operations to the class diagram according to the messages in the above sequence or communication diagram.

12 Outline of the following tutorials
Use Case Modelling Activity modelling Class modelling Interaction Modelling But next academic year: BSc Computing program SE1 (Level 4, compulsory), SE2 (Level 5, optional) Information System A&D (Level 5, Compulsory) Information System A&D II (Level 6, Compulsory)

13 Part I: Use Case Modelling

14 Use Case Modelling Steps
[Step 1] Find actors from the above requirements. [Step 2] Find use cases from the above requirements. [Step 3] Draw a use case diagram for the online shopping application. [Step 4] Write a use case description for the use case “Order configured computer”. Use your general knowledge of typical order processing tasks to derive details not stated in the requirements.

15 Requirements 3. The customer may choose to order a computer online or may request a salesperson to contact them to explain order details, negotiate the price, etc. before the order is actually placed. 7. The warehouse obtains the invoice from the salesperson and ships the computer to the customer.

16 Step 1: Actors in the Requirements
3. The customer may choose to order a computer online or may request a salesperson to contact them to explain order details, negotiate the price, etc. before the order is actually placed. 7. The warehouse obtains the invoice from the salesperson and ships the computer to the customer. NB: The shipment process is not part of our system 16

17 Step 2: Full List of Use Cases in the requirements
3. The customer may choose to order a computer online or may request a salesperson to contact them to explain order details, negotiate the price, etc. before the order is actually placed. 7. The warehouse obtains the invoice from the salesperson and ships the computer to the customer.

18 Step 3: Full List of Use Cases in the Requirements
Req. No Actor Use case 1 Customer Display Standard Configuration 2 Build Configuration 3 Customer, Salesperson Order Computer Request Contact 4 Order Computer Verify & Accept Payment 5 Salesperson Warehouse Inform Warehouse about Order 6 Display Order Status 7 Print Invoice Buying computers over the Internet

19 Step 3: Use Case Diagram

20 Step 4: Use Case Description (1)
see p. 3 of OnlineShoppingBackground.pdf

21 Step 4: Use Case Description (2)

22 Part II: Activity modelling
22

23 Activity Modelling [Step 5] Find actions from the above use case description. [Step 6] Draw an activity diagram for the use case “Order configured computer”.

24 Recap Session3: Activity Diagram
initial node black circle decision node merge node diamond guard condition in square brackets final node black circle in white circle [campaign to add] [no campaign to add] Add a New Client Assign Staff Contact Add New Campaign The flow of control will follow along the first control flow with a guard condition that evaluates to true. 24 24

25 Recall From Step 4: Use Case Description

26 Use Case Description (2)

27 Step 5: Actions from Use case description
Main flow: (3) The Customer chooses the Purchase (or similarly named) function to send the order to the manufacturer. (4) The system assigns a unique order number and a customer account number to the purchase order and it stores the order information in the database. (5) The system s the order number and the customer number to the Customer, together with all order details, as the confirmation of the order’s acceptance.

28 Actions for the Use case
(1) (2) (3) (4) (5) (6) (7) Find the actions in the main and alternative flows!

29 Step 6: Activity Diagram for the Use case
When performing the action Display purchase form, the timeout condition can terminate the execution of the activity model. Alternatively, the action Get purchase details is activated. If the purchase details are incomplete, the system again reaches the action Display purchase form. Otherwise, the system performs Store order, followed by order details

30 Part III: Class modelling

31 Class Modelling [Step 7] Find entity classes from the above requirements. [Step 8] Think about the attributes for the above classes. Consider only attributes with primitive types. [Step 9] Add associations to the class model. Consider what access paths between these classes are required by the use cases. [Step 10] Add aggregations or compositions to the class model. [Step 11] Add generalisations to the class model. Consider how you can extract any common attributes in the existing classes into a high-level class. [Step 12] Draw a class diagram for the online shopping application. Modify the attribute content of classes as necessary due to the introduction of the generalisation hierarchy.

32 Requirements 6. The details of the transaction, including the order number and the customer account number, are ed to the customer, so that the customer can check the status of the order online. 7. The warehouse obtains the invoice from the salesperson and ships the computer to the customer.

33 Step 7: Entity classes from requirements
6. The details of the transaction, including the order number and the customer account number, are ed to the customer, so that the customer can check the status of the order online. 7. The warehouse obtains the invoice from the salesperson and ships the computer to the customer.

34 Step 7: Entity classes Do we need the Shipment class if we know that the shipment is the warehouse responsibility and it is therefore out of the scope? Is OrderStatus a class or an attribute of Order or Invoice? Is Salesperson a class or an attribute of Order or Invoice?

35 Step 7: Entity classes from requirements

36 Step 8: Attributes

37 Step 9-10: Associations

38 Composition vs aggregation
In both aggregation and composition object of one class "owns" object of another class. But there is a subtle difference. In Composition the object of class that is owned by the object of it's owning class cannot live on it's own Also called "death relationship". It will always live as a part of it's owning object In Aggregation the dependent object is standalone and can exist even if the object of the owning class is dead. So in composition if owning object is garbage collected the owned object will also be which is not the case in aggregation. Confused? Composition Example : Consider example of a Car and an engine that is very specific to that car (meaning it cannot be used in any other car). This type of relation ship between Car and SpecificEngine class is called Composition. Object of Car class cannot exist without object of SpecificEngine class and object of SpecificEngine has no significance without Car class. To put in simple words Car class solely "owns" the SpecificEngine class. Aggregation Example : Now consider class Car and class Wheel. Car needs a Wheel object to function. Meaning Car object own Wheel object but we cannot say Wheel object has no significance without Car Object. It can very well be used in a Bike, Truck or different Cars Object. Aggregation and Composition are subsets of association meaning they are specific cases of association.

39 unfilled diamond denotes aggregation
Notation: Aggregation A student could be in a number of modules If a module is cancelled, students are not destroyed Module Student 0..* 1..* unfilled diamond denotes aggregation “Owing” class 40 40

40 filled diamond denotes composition
Notation: Composition An ingredient is in only one meal at a time If you drop your meal on the floor, you probably lose the ingredients too Meal Ingredient 1..* 1 filled diamond denotes composition “Owing” class 41 41

41 Small trick Trick to remember the difference : has A -- Aggregation
Own -- cOmposition So in composition if owning object is garbage collected the owned object will also be which is not the case in aggregation. Confused? Composition Example : Consider example of a Car and an engine that is very specific to that car (meaning it cannot be used in any other car). This type of relation ship between Car and SpecificEngine class is called Composition. Object of Car class cannot exist without object of SpecificEngine class and object of SpecificEngine has no significance without Car class. To put in simple words Car class solely "owns" the SpecificEngine class. Aggregation Example : Now consider class Car and class Wheel. Car needs a Wheel object to function. Meaning Car object own Wheel object but we cannot say Wheel object has no significance without Car Object. It can very well be used in a Bike, Truck or different Cars Object.

42 Step 11-12: Class Diagrams

43 Part IV: Interaction modelling

44 Interaction Modelling
[Step 13] Draw a sequence diagram for the action “Display current configuration”. [Step 14] Convert the above sequence diagram into a communication diagram. [Step 15] Add operations to the class diagram according to the messages in the above sequence or communication diagram.

45

46

47 Step 13: Sequence Diagram

48 Step 14: Communication Diagrams

49 Step 15: Operations


Download ppt "Systems Analysis and Design I"

Similar presentations


Ads by Google