Presentation is loading. Please wait.

Presentation is loading. Please wait.

Notations. Requirements Documentation Typical parts of Requirements Document Functional requirements Behavior of the software system Nonfunctional requirements.

Similar presentations


Presentation on theme: "Notations. Requirements Documentation Typical parts of Requirements Document Functional requirements Behavior of the software system Nonfunctional requirements."— Presentation transcript:

1 Notations

2 Requirements Documentation Typical parts of Requirements Document Functional requirements Behavior of the software system Nonfunctional requirements Quality characteristics of software system Diagrams 1

3 Outline Use Case diagram Unified Modeling Language (UML) Entity Relationship Diagram (ERD) Dataflow diagram Message Sequence diagram State chart Putting it all together 2

4 Use Case Diagrams Stick man for users Ovals for use cases (UCs) Italicize “abstract” use cases Simple arrows when a UC “calls” another Open arrowheads for specialization Similar to the role that subclassing plays in OO 3

5 Use Case Diagrams 4 backcountry skier Use Case #2: Clarify Location and Time Use Case #2: Clarify Location and Time Use Case #1: Report Avalanche

6 5 backcountry skier Use Case #2: Clarify Location and Time Use Case #2: Clarify Location and Time Use Case #1: Report Avalanche avalanche forecaster Use Case #3: View Recent Avalanche Activity Use Case #3b: View by Location Use Case #3b: View by Location Use Case #3a: View by Time Use Case #3a: View by Time

7 Outline Use Case diagram Unified Modeling Language (UML) Entity Relationship Diagram (ERD) Dataflow diagram Message Sequence diagram State chart Putting it all together 6

8 Unified Modeling Language (UML) One box per kind of entity, listing attributes Italicize abstract entities, attributes Lines without arrowheads show references Similar to member variables in OO Labeled with cardinality (multiplicity) Integers, ranges, or asterisk (for unlimited) Lines with open arrowheads for specialization Lines with regular arrowheads can be used to indicate dependencies Usually omitted in requirements’ class diagrams 7

9 8 UML User + username User + username Avy report + user + time (datetime) + location (geocode) + details (string) Avy report + user + time (datetime) + location (geocode) + details (string) Avy Entry + user + when (datetime) + where (geocode) + details (string) Avy Entry + user + when (datetime) + where (geocode) + details (string) Clarification + when (datetime) + where (geocode) + details (string) Clarification + when (datetime) + where (geocode) + details (string) Avy view + Avy report Avy view + Avy report Table view (time) + HTML Table view (time) + HTML Google map view + JavaScript Google map view + JavaScript 1 * 1 0..1 1 * * * system boundary

10 Outline Use Case diagram Unified Modeling Language (UML) Entity Relationship Diagram (ERD) Dataflow diagram Message Sequence diagram State chart Putting it all together 9

11 Entity-Relationship Diagrams (ERDs) One box per kind of entity List entities on branches Lines with a diamond show relationships Diamond label indicates role of relationships Numbers or variables on lines show cardinality 10

12 11 ERD 1 n 1 0..1 1 r p q User Avy report Avy entry Clarification Avy view Table view (time) Google map view writes yields shows asks for

13 Outline Use Case diagram Unified Modeling Language (UML) Entity Relationship Diagram (ERD) Dataflow diagram Message Sequence diagram State chart Putting it all together 12

14 Dataflow Diagram Each oval is a “function” provided by system Each inward arrow is a parameter (labeled) Each outward arrow is an output (labeled) Each rectangle is an actor A person, place, or thing that can do stuff and/or initiate events Each “half-rectangle” is a data store Best practices: separate dataflow diagram for each use case 13

15 14 skier report raw message DB raw message DB interpret clarify avy reports DB avy reports DB send clarification geocoder map view table view viewer avy info clarification message message location geocode report raw message clarification message report map html table Dataflow Diagram

16 Break Time!!! 15

17 Outline Use Case diagram Unified Modeling Language (UML) Entity Relationship Diagram (ERD) Dataflow diagram Message Sequence diagram State chart Putting it all together 16

18 Message Sequence Diagram One box per entity involved If you have two users interacting with each other, then you would have two boxes Each box has a dashed line, showing its “lifetime”, which can end if an object is destroyed Arrows show messages Also, draw an arrow back if there’s a return value Conditionals are written with brackets [ ] Loops can be enclosed in a shaded box 17

19 [geocode != null] 18 Message Sequence Diagram User System Database avy report Request to clarify [if geocode == null] Geocoder Geocode create report location info

20 Outline Use Case diagram Unified Modeling Language (UML) Entity Relationship Diagram (ERD) Dataflow diagram Message Sequence diagram State chart Putting it all together 19

21 State Charts Shows change over time One box per state Arrows show a possible state transition Annotated to indicate under what conditions the transition occurs Filled circle shows where you “start” Nested filled circle shows where you “stop” 20

22 State Charts 21 raw avy report (just text) in database Geocoded (geocode != null) record avy info geocoding fails geocoding succeeds receive messag e done

23 Outline Use Case diagram Unified Modeling Language (UML) Entity Relationship Diagram (ERD) Dataflow diagram Message Sequence diagram State chart Putting it all together 22

24 Requirements Documentation Requirements definition – Unstructured text: functional & non-functional requirements – Use case descriptions – Class diagrams or ERDs showing external entities Requirements specification – Unstructured text: functional & non-functional requirements – Dataflow diagram – Message sequence diagrams or state charts 23

25 Examples: Support drug and alcohol counseling 24 http://cf.polarishealth.com/demo/start_demo.html

26 Requirements Definition: Functional Requirements Before each counseling visit, each counselee takes a survey After each survey, the system prints a report showing the counselee’s progress Administrative assistants can add counselees and their counselors to the system 25 Requirements definition: written from external viewpoint; system is like a “black box”

27 Requirements Definition: Non-functional Requirements Each survey will be short enough for an average user to complete within 10 minutes. Progress reports will each be 2 pages or less. The system will print progress reports within 2 minutes of a survey’s completion. Users can take a survey using a Windows machine that has a Pentium II 550 MHz CPU, with 0.5 GB of RAM. 26 Requirements definition: written from external viewpoint; system is like a “black box”

28 Use Case #1: Survey and Report Actor: Counselee Precondition: Counselee registered in system Postconditions: Counselee progress data is recorded in system Report is printed for use by counselor Flow of events: Counselee logs in (lastname + PIN) System collects survey data from counselee System prints report 27

29 Class Diagram (UML) 28 Counselor + reports Counselor + reports Counselee + counselor + surveys Counselee + counselor + surveys Survey + questions (String []) + answers (int []) + counselee Survey + questions (String []) + answers (int []) + counselee 1 * User + lastname (string) + PIN (int) User + lastname (string) + PIN (int) 1 * Report + surveys + counselor Report + surveys + counselor * * 1 * System boundary

30 Requirements Specification: Functional Requirements The system will provide screens so that when counselee and counselor data are entered into the system, these data are transferred to a database or other permanent storage. When survey data arrive, they will be saved and a report will be output to the printer. 29 Requirements specification: written from system’s viewpoint, involving internal details of system

31 Requirements Specifications: Non-Functional Requirements 95% of the code will be platform-independent (Java or platform-independent JavaScript). The system will record completed surveys in the database within 30 seconds; reports will be sent to the printer within 30 seconds and emerge within 60 seconds. 30 Requirements specification: written from system’s viewpoint, involving internal details of system

32 Dataflow Diagram (Use Case #1) 31 Survey DB Survey Survey answers Health Information patient’s answers (ever) Counselee Counselor Create report Postscript Printer Pick up Printout Printout Authenticate User ID Last name & PIN

33 Message Sequence Diagram (Use Case #1) 32 [survey complete] Counselee Server Database Log in Printer Present question Answer question Record answers Get report data Send report to printer

34 A Few Comments These are just the basic diagrams. Sufficient for our homework, exams, and probably 90% of what you’ll see after graduation Fancier versions of these diagrams do exist It’s OK to draw diagrams by hand As long as you respect the notation 33

35 Next Steps Get started on your Requirements homework Email me if you have questions Better yet, come to office hours! Every team member should contribute!! Next lecture: Prototyping 34


Download ppt "Notations. Requirements Documentation Typical parts of Requirements Document Functional requirements Behavior of the software system Nonfunctional requirements."

Similar presentations


Ads by Google