Presentation is loading. Please wait.

Presentation is loading. Please wait.

Anskaffelse og kravspecifikation

Similar presentations


Presentation on theme: "Anskaffelse og kravspecifikation"— Presentation transcript:

1 Anskaffelse og kravspecifikation
SR4_FuncDetail

2 Russisk MIG

3

4 SR4: Functional details
Kilder SR: Soren Lauesen: Software requirements - Styles and techniques. Addison-Wesley, 2002. UID: Soren Lauesen: User interface design - A software engineering perspective. Addison-Wesley, Fra kapitel 5. SL-07: Søren Lauesen: Vejledning til kravskabelon SL-07. Samfundslitteratur, 2007. Ekstra: Nye slides som ikke har noget sidestykke i bøgerne. Mange slides er vist i dansk oversættelse. © 2002, 2005, Pearson Education retains the copyright to the slides from the books, but allows restricted copying for teaching purposes only. It is a condition that the source and copyright notice is preserved on all the material.

5 5. SR4.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 Discount calculation Business rules Tax calculation Payroll Optimize roster Voice recognition: "Show possible leaks" A B C E B+D+E D Possible requirement styles: A. (Leave to intuition) B. Natural language or tables C. Process description (algorithm) D. Performance specification (quality) E. Refer to laws and agreements Suitable choices? From: Soren Lauesen: Software Requirements © Pearson / Addison-Wesley 2002

6 6. SR4.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 single 25% 2. Family with more than one room, discount for additional rooms 10% 3. Discount at immediate checkin: 3a. Before 6pm and hotel less than 50% booked, fair weather 25% 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

7 Or-condition between cells.
7. SR4.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 single Y N Y 2. Family, additional rooms N Y Y 3. Immediate checkin Y Y 4. Before 6 pm Y Y 5. Less 50% booked Y Y 6. Fair weather N Y a. Room discount 25% v ? b. Room discount 10% v c. Early discount 25% v d. Early discount 0% v e. Error v R2. Managers shall be able to change the rates and the rules Or-condition between cells. Action taken only once. From: Soren Lauesen: Software Requirements © Pearson / Addison-Wesley 2002

8 8. SR4.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 Ends up in many code pieces Each function should cover: Input expected state state changes output From: Soren Lauesen: Software Requirements © Pearson / Addison-Wesley 2002

9 9. Extra: Structured natural language
Certification Specification for Aircraft Engines (CS-E): Raw extract of CS-E The Engine Control System must be designed and constructed so that in the Full-up Configuration, the system is essentially single Fault tolerant for electrical and electronic Failures with respect to LOTC/LOPC events. [Loss Of Thrust/Power Control] Structured natural language While in a Full-up Configuration, the Engine Control System shall be Essentially Single Fault Tolerant with respect to LOTC/LOPC events. Other structured examples from CS-E While the aircraft is on-ground, when reverse thrust is commanded, the control system shall enable thrust reverser deployment. While the aircraft is in-flight, if reverse thrust is commanded, then the control system shall inhibit thrust reverser deployment. Normal event Unwanted event From: Mavin et al.: EARS (Easy Approach to Requirements Syntax) To appear in Proceedings of Requirements Engineering 09

10 10. SR4.4 State (-transition) 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 cancel repair done create ? free booked book changeRoom checkout changeRoom checkin Life cycle of an object checkin repair occupied event From: Soren Lauesen: Software Requirements © Pearson / Addison-Wesley 2002

11 11. SR4.5 State-transition Matrix
States: Event: From: Soren Lauesen: Software Requirements © Pearson / Addison-Wesley 2002

12 12. SR4.6A Activity diagram, workflow, BPMN
Action Petri-net Synchronization From: Soren Lauesen: Software Requirements © Pearson / Addison-Wesley 2002

13 13. SR4.6B Fork and join From: Soren Lauesen: Software Requirements
© Pearson / Addison-Wesley 2002

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

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

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

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

18 State (-transition) diagram
18. Diagrams - major ones Booking request Booking guest data Guests Dataflow model Data Activity (process) Data store free booked book checkin cancel State (-transition) diagram (for one object) Retrieve booking Display guest . . . Display error [found] Activity (action) Next (algorithm) Flow chart State Transition (event) Retrieve booking Display guest . . . Display error [found] Next (algorithm) Data Data store Stay Guest E/R model Activity diagram Data Relation


Download ppt "Anskaffelse og kravspecifikation"

Similar presentations


Ads by Google