You are on page 1of 22

Case Study: Air Gourmet

rosad5@home.unpar.ac.id

rplganjil2005
30 Januari 2013 rpl ganjil 2005/rd5 1

Use-Case Diagram
Use-case model for making a reservation

30 Januari 2013

rpl ganjil 2005/rd5

Scenario: Making a Reservation

30 Januari 2013

rpl ganjil 2005/rd5

Use-Case Diagram
Use-case for returning and scanning a postcard

30 Januari 2013

rpl ganjil 2005/rd5

Scenario: Postcards

30 Januari 2013

rpl ganjil 2005/rd5

Class Modeling : Noun Extraction


Stage 1. Concise Problem Definition

Define product in single sentence

A computerized system is needed to provide information regarding the efficacy of a special meals program.

30 Januari 2013

rpl ganjil 2005/rd5

Class Modeling: Noun Extraction


Stage 2. Informal Strategy

Incorporate constraints, express result in a single paragraph

Reports are to be generated to document the efficacy of the special meals program. The reports concern meals loaded on flights, flights boarded by passengers, names and addresses of passengers, meal quality, and low-sodium meals.

30 Januari 2013

rpl ganjil 2005/rd5

Stage 3. Formalize the Strategy

Identify nouns in informal strategy. Use nouns as candidate classes

Nouns
Class Modeling: Noun Extraction report, efficacy, program, percentage, meal, flight, boarding, passenger, name, address, quality efficacy, program, percentage, boarding, quality are abstract nouns exclude (they may become attributes) name, address are attributes of passenger Question: Should meal and flight be classes? It is easier to add classes than to remove them Candidate classes: Report and Passenger

rpl ganjil 2005/rd5 8

30 Januari 2013

First Iteration of Class Diagram)


Problems with this class diagram Data for reports are needed on a per-flight basis Each report has to access multiple flights Each flight has multiple passengers Six reports (not four) are needed
30 Januari 2013 rpl ganjil 2005/rd5 9

Second Iteration of Class Diagram


Cause of our problems Flight should have been a candidate class

30 Januari 2013

rpl ganjil 2005/rd5

10

Dynamic Model (state diagram)


30 Januari 2013 rpl ganjil 2005/rd5 11

Object-Oriented Design
OOD consists of four steps:
1. Construct interaction diagrams for each scenario 2. Construct the detailed class diagram 3. Design the product in terms of clients of objects 4. Proceed to the detailed design

30 Januari 2013

rpl ganjil 2005/rd5

12

Step 1. Interaction Diagrams


Extended scenario for making a reservation

30 Januari 2013

rpl ganjil 2005/rd5

13

Step 1. Sequence Diagram for making a reservation

30 Januari 2013

rpl ganjil 2005/rd5

14

Step 1. Collaboration diagram for sending and returning a postcard

30 Januari 2013

rpl ganjil 2005/rd5

15

Step 2. Detailed Class Diagram (C++ version)

30 Januari 2013

rpl ganjil 2005/rd5

16

Step 2. Detailed Class Diagram (C++ version)

30 Januari 2013

rpl ganjil 2005/rd5

17

Step 2. Detailed Class Diagram (Java version)

30 Januari 2013

rpl ganjil 2005/rd5

18

Step 2. Detailed Class Diagram (Java version)

30 Januari 2013

rpl ganjil 2005/rd5

19

Step 3. Client Object Relations (C++)


30 Januari 2013 rpl ganjil 2005/rd5 20

Step 3. Client Object Relations (Java)


30 Januari 2013 rpl ganjil 2005/rd5 21

Step 4. Detailed Design


The detailed design can be found in
Appendix H (for implementation in C++) Appendix I (for implementation in Java)

30 Januari 2013

rpl ganjil 2005/rd5

22

You might also like