Presentation is loading. Please wait.

Presentation is loading. Please wait.

Plancher til Anskaffelse og kravspecifikation, Forår 2007 Lauesen: Software requirements - Styles and techniques 4. Functional details Plancherne stammer.

Similar presentations


Presentation on theme: "Plancher til Anskaffelse og kravspecifikation, Forår 2007 Lauesen: Software requirements - Styles and techniques 4. Functional details Plancherne stammer."— Presentation transcript:

1 Plancher til Anskaffelse og kravspecifikation, Forår 2007 Lauesen: Software requirements - Styles and techniques 4. Functional details Plancherne stammer fra lærebogen. Står planchens nummer i parentes, er planchen en tilføjelse til lærebogen.

2 Fig 4.1 Complex and simple functions Domain obvious FindFreeRoom PrintInvoice Checkin if booked if non-booked if add room Fastest truck route Voice recognition: "Up two lines" Domain non-obvious Simple program Interaction complexity Hard to program Possible requirement styles: A.(Leave to intuition) B.Natural language or tables C.Process description (algorithm) D.Performance specification E.Refer to laws and agreements Suitable choices? From: Soren Lauesen: Software Requirements © Pearson / Addison-Wesley 2002 A B C E D B+D+E Discount calculation Business rules Tax calculation Payroll Optimize roster Voice recognition: "Show possible leaks"

3 Fig 4.2A Business rules, informal table R1.The product shall suggest the following discount rates if a customer asks for discount: 1.Double room used as single25% 2.Family with more than one room, discount for additional rooms10% 3.Discount at immediate checkin: 3a.Before 6pm and hotel less than 50% booked, fair weather25% 3b.Before 6 pm and hotel less than 50% booked, bad weather 0% Case 1 and 2 cannot apply in the same stay. R2.Managers shall be able to change the rates From: Soren Lauesen: Software Requirements © Pearson / Addison-Wesley 2002

4 Fig 4.2B Business rules, decision table R1. The product shall suggest the following discount rates if the customer asks for discount: 1. Dble room used as singleYNY 2. Family, additional roomsNYY 3. Immediate checkinYY 4. Before 6 pmYY 5. Less 50% bookedYY 6. Fair weatherNY a. Room discount 25%v? b. Room discount 10%v c. Early discount 25%v d. Early discount 0%v e. Errorv R2.Managers shall be able to change the rates and the rules From: Soren Lauesen: Software Requirements © Pearson / Addison-Wesley 2002

5 Fig 4.3 Process description, pseudo-code The product shall provide the following functions: 1.1 FindFreeRoom (type, period) List rooms of the requested type that are free in the period requested. Allow the user to select some of them as CurrentRooms in the requested period. 1.2 CreateNewStay (partial guest data, guest record) Create a temporary CurrentStay. If guest record exists then fill CurrentStay with recorded guest data else fill CurrentStay with partial guest data. Note: The product should look for similar records too. 1.3 Checkin (CurrentStay, CurrentRooms) If CurrentStay is booked, record rooms in stay as occupied. If CurrentStay is not recorded, check CurrentRooms free. If guest not recorded, check guest data complete, record guest. record CurrentRooms as occupied, record stay. If... From: Soren Lauesen: Software Requirements © Pearson / Addison-Wesley 2002

6 Fig 4.4 State diagrams Rooms have a RoomState for each day in the planning period. The status shows whether the room is free, occupied, etc. that day. R12:RoomState shall change as shown in Fig. 12. Fig. 12. RoomState freebooked occupied repair book checkinchangeRoom checkin checkoutchangeRoom event cancel repair done create ? From: Soren Lauesen: Software Requirements © Pearson / Addison-Wesley 2002

7 Fig 4.5 State-transition Matrix From: Soren Lauesen: Software Requirements © Pearson / Addison-Wesley 2002

8 From: Soren Lauesen: Software Requirements © Pearson / Addison-Wesley 2002 Fig 4.6A Activity diagram, workflow

9 Fig 4.6B Fork and join From: Soren Lauesen: Software Requirements © Pearson / Addison-Wesley 2002

10 Fig 4.7A UML Class Diagram Stay stay# paymethod checkout recordService printConfirm Room State date #persons state setState getState set... Room... Service date count set... get... ServiceType name price set... Guest name address passport book... 1 0..* 1 1 0..1 1..* 0..* 1 Program: curRoomState.setState(occupied) Class name Operations Association = relationship From: Soren Lauesen: Software Requirements © Pearson / Addison-Wesley 2002

11 Fig 4.7B OO Business Application Guest name... set... Stay stay#... set... Room date... set... SQL-driven database Service (empty) checkout book... Rooms window Display attr. Update Stay window Display attr. Update Data objects (trivial functions) Service and Observer functions (little data) User interface objects (GUI) Observe (empty) update From: Soren Lauesen: Software Requirements © Pearson / Addison-Wesley 2002 Practice: sql statements. Different for each window SOA: Provide universal services? Hide data model?

12 Fig 4.8 Collaboration diagram Stay Room State Room Service Type 1.1: * get- Service 1.1.1: get- ServicePrice 1.2: * getRoom 1.2.1: getRoomPrice 1: checkOut From: Soren Lauesen: Software Requirements © Pearson / Addison-Wesley 2002

13 Fig 4.9 Sequence diagram Product Account system OK Transfer OK Data 1 Data 2 Done Event + message + reply Message + reply Asynchronous message User Product free rooms FindRooms SelectRoom Event + message + reply Event + asynchronous message From: Soren Lauesen: Software Requirements © Pearson / Addison-Wesley 2002


Download ppt "Plancher til Anskaffelse og kravspecifikation, Forår 2007 Lauesen: Software requirements - Styles and techniques 4. Functional details Plancherne stammer."

Similar presentations


Ads by Google