1 / 24

ניתוח ועיצוב מערכות תוכנה אביב 2014

ניתוח ועיצוב מערכות תוכנה אביב 2014. נסיבות שימוש (Use Case Modeling). משה אונגר mosheun@post.bgu.ac.il שעת קבלה בתיאום מראש במייל: חמישי 10:00-11:00, חדר 304 בניין 37. Particle Sessions Schedule 2014. Overview.

shiloh
Download Presentation

ניתוח ועיצוב מערכות תוכנה אביב 2014

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ניתוח ועיצוב מערכות תוכנהאביב 2014 נסיבות שימוש (Use Case Modeling) משה אונגר mosheun@post.bgu.ac.il שעת קבלה בתיאום מראש במייל: חמישי 10:00-11:00, חדר 304 בניין 37

  2. Particle Sessions Schedule 2014

  3. Overview • A use case captures the intended functionality of the system (or subsystem, class or interface) you are developing, without having to specify how that functionality is implemented. • “A use case is a narrative document that describes the sequence of events of an actor (an external agent) using a system to complete a process.” [Jacobson] • “They are stories or cases of using a system. Use case are not exactly requirements or functional specifications, but they illustrate and imply requirements in the stories they tell.” [Larman] • “A description of set of sequence of actions, including variants, that a system performs that yield an observable result of value to an actor.” [Booch]

  4. Use Case Description Template 4

  5. Finding Actors • External objects that produce/consume data: • Must serve as sources and destinations for data • Must be external to the system Humans Machines External systems Sensors Database Printer Organizational Units

  6. Use Case Diagram • Actor: • An actor is a person, organization, or external system that plays a role in one or more interactions with your system. • You can use inheritance on actors. • Notice the association. • Use Case: • A use case describes a sequence of actions that provide something of measurable value to an actor - describing an interaction between a actor and a system. • A single unit of meaningful work. E.g. login, register, place an order. • Subject Boundary: • Indicates the scope of your subject.  • Anything within the box represents functionality that is in scope and anything outside the box is not Actor Use case subject boundary Online Shopping

  7. Organizing Use Case - Include • An include relationship between use cases means that the base use case explicitly incorporates the behavior of another use case at a location specified in the base. • Particular Use Case must include another use case to perform its function.  • When to use it? • Use include when you are repeating yourself in two or more separate use cases and you want to avoid repetition. • Another motivation is simply to decompose an overwhelmingly long use case into subunits to improve comprehension.

  8. Organizing Use Case - Extend • An extend indicate that one use case (extension) extends the behavior of another use case (base). • The extend relationship specifies that the incorporation of the extension use case is (optional) dependent on what happens when the base use case executes. • Useful when, for some reason, we would not like to change a certain Use Case we need to extend. • There can be many extending use cases and many extension points.

  9. Include vs. Extend - Comparison

  10. דוגמא 1(מועד ב, סמסטר א, 2008) • מונופול הוא משחק לוח המבוסס על עולם העסקים האמיתי בו מבצעים מהלכי קנייה ומכירה של נכסי נדל"ן. המשחק מבוצע תוך כדי סימולציה של מהלכים עסקיים אמיתיים, כשהשחקנים קונים ומוכרים נכסים, בונים בתים ומלונות. המנצח במשחק הוא זה שצובר את הרכוש הרב ביותר (סכום ערך הנדל"ן והמזומנים שיש ברשותו). • חוקים: • הלוח מורכב ממשבצות שמקיפות אותו (לפחות 40 משבצות- תלוי קונפיגורציה). • כל שחקן בתורו מטיל קובייה ומתקדם לפי תוצאת הקובייה לכיוון קבוע. • אם שחקן נוחת על משבצת שמייצגת שטח (רחוב בעיר מסוימת) שלא שייך לאף שחקן אחר הוא יכול לקנות אותו. • אם הוא נוחת על שטח שכבר שייך לשחקן אחר עליו לשלם לו דמי שכירות, בהיקף אשר נקבע ע"י הטלת קובייה. • על ידי קניית בתים בתוך השטחים ניתן להעלות את גובה דמי השכירות בשטח בו נמצא הבית. • חובה לקנות את כל העיר (כל הרחובות בעיר) לפני קנית בית. • לאחר קניית 4 בתים ניתן לבנות מלון המגדיל את סכום השכירות עוד יותר. • בכל פעם שחולפים על פני משבצת הפתיחה או נוחתים עליה, זוכים בסכום מסוים של כסף (תלוי קונפיגורציה). • אם שחקן נוחת על משבצות "ההפתעה" עליו לקחת קלף הפתעה ולבצע את ההוראות שבו (לזכות או לשלם סכום כסף מסוים לקופת המשחק). • ישנה משבצת כלא שתנאי הכניסה והשחרור ממנה מוגדרים בקונפיגורציה של המשחק. • במשחק משחקים 2 עד 4 שחקנים אנושיים. במידה וחסרים שחקנים אנושיים, ניתן להגדיר שחקני מחשב. שחקן המחשב יכול לשחק באסטרטגיה חמדנית (בכל הזדמנות שיש לו לקנות נכס כלשהוא, הוא יקנה אותו, אלא אם אין לו כסף) או רנדומאלית (מחליט באופן אקראי אם לקנות נכס נתון). המשחק נגמר כאשר אחד השחקנים מחליט לעצור אותו.

  11. פתרון דוגמא 1 – תרשים UC

  12. דוגמא 2 (מועד א, סמסטר א, 2008) • מונופול הוא משחק לוח המבוסס על עולם העסקים האמיתי בו מבצעים מהלכי קנייה ומכירה של נכסי נדל"ן. המשחק מבוצע תוך כדי סימולציה של מהלכים עסקיים אמיתיים, כשהשחקנים קונים ומוכרים נכסים, בונים בתים ומלונות. המנצח במשחק הוא זה שצובר את הרכוש הרב ביותר (סכום ערך הנדל"ן והמזומנים שיש ברשותו). • חוקים: • הלוח מורכב ממשבצות שמקיפות אותו (לפחות 40 משבצות- תלוי קונפיגורציה). • כל שחקן בתורו מטיל קובייה ומתקדם לפי תוצאת הקובייה לכיוון קבוע. • אם שחקן נוחת על משבצת שמייצגת שטח (רחוב בעיר מסוימת) שלא שייך לאף שחקן אחר הוא יכול לקנות אותו. • אם הוא נוחת על שטח שכבר שייך לשחקן אחר עליו לשלם לו דמי שכירות. • על ידי קניית בתים בתוך השטחים ניתן להעלות את גובה דמי השכירות בשטח בו נמצא הבית. • חובה לקנות את כל העיר (כל הרחובות בעיר) לפני קנית בית. • לאחר קניית 4 בתים ניתן לבנות מלון המגדיל את סכום השכירות עוד יותר. • בכל פעם שחולפים על פני משבצת הפתיחה או נוחתים עליה, זוכים בסכום מסוים של כסף (תלוי קונפיגורציה). • ביישום זה יש משתמש אחד, תצפיתן, אשר מגדיר את כמות השחקנים שישתתפו במשחק, ועוקב אחרי מהלכי המשחק. המשחק נגמר כאשר אחד השחקנים הווירטואליים או התצפיתן מחליטים לעצור אותו או כאשר מוכרז מנצח.

  13. פתרון דוגמא 2 – תרשים UC

  14. פתרון דוגמא 2 – תיאור UC • Use Case UC1: Play Monopoly Game • Actor: Observer • Pre Condition: Use-case “Set Game Settings” was performed. • Post Condition: A winner has been declared or Observer cancels. • Main Success Scenario: • System displays game trace for next player move. • Repeat step 1 until a winner is declared or Observer cancels. • Extensions: *a. At any time, System fails: • (To support recovery, System logs after each completed move) • Observer restarts System. • System detects prior failure, reconstructs state, and prompts to continue. • Observer chooses to continue (from last completed player turn). • Player wishes to start use-case “End Game”

  15. דוגמא 3 (מבחן מועד א' 2013) • שאלה 2 (14 נקודות) (2 נק) דני אינו בטוח מה לעשות כדי שיהיה ברור שגם ישות Researcher תוכל להפעיל את התרחישים: UC-1, UC-3, UC-5. עזור לו לתקן את התרשים במינימום שינויים. (הוסף את השינויים ע"ג התרשים) א. (1 נק) כמה אנשים צריכים להשתתף בהרצת ניסוי (UC-2)? ב. (1 נק) דני לא בטוח האם מותר לו למחוק את הקו בין End User לUC-4 בלי לפגוע בהגדרת המערכת. עזור לו והסבר: ג. (1 נק) ומה לגבי הקו בין Configuration User לUC-3? ד. (1 נק) ומה לגבי הקו בין End User לUC-1? ה. (8 נק) השלם את תרשים הUse Case ופרט את כל תרחישי המשנה של UC-5: Manage Profiles.

  16. דוגמא 3 (מבחן מועד א' 2013) א. (1 נק) כמה אנשים צריכים להשתתף בהרצת ניסוי (UC-2)? לפחות 2 ב. (1 נק) דני לא בטוח האם מותר לו למחוק את הקו בין End User לUC-4 בלי לפגוע בהגדרת המערכת. עזור לו והסבר:לא, כיוון שUC-4 מופעל מתוך UC-2 ללא קשר לUC-1. כן, אם UC-4 הוא חלק של UC-1 בלבד. ג. (1 נק) ומה לגבי הקו בין Configuration User לUC-3? כן,UC-3 הוא חלק מ UC-1 בלבד וConfiguration User הוא Actor הכרחי בUC-1. ד. (1 נק) ומה לגבי הקו בין End User לUC-1? כן, כיוון ש End User משתתף בUC-4

  17. דוגמא 3 (מבחן מועד א' 2013) • UC-1: Explore Surroundings • Summary: A End User (also called Blind User) uses the system to understand what is located in front of him by listening to the 3D-sounds produced by the system. The system processes every video frame captured from the camera to detect and track objects in the camera's sight. The system calculates coordinates of every tracked object relative the user's head. For every such object a corresponding sound is generated. Finally the generated sounds are positioned in the 3D space according to calculated coordinates. This process repeats until the user stops it. • Actors: • (2 נק) השלם את הישויות (Actors) הרלוונטיות ואת תפקידן בתרחיש. אם נדרש תקן את תרשים ה-Use Case. • Trigger: System start up. • Main Success Scenario: • When the system starts up it loads the main components and ensures that a SSR is running and available. • Load profile (UC-3). • Configuration User activates the sensory substitution (UC-4) by pressing the "Activate" button. The sensory substitution is active until deactivated. • Alternative flows and Exceptions: • 1.a. If SSR is not available display appropriate message and exit. • 1.b. If camera is not found display appropriate message and exit.

  18. דוגמא 3 (מבחן מועד א' 2013) • UC-1: Explore Surroundings • Summary: A End User (also called Blind User) uses the system to understand what is located in front of him by listening to the 3D-sounds produced by the system. The system processes every video frame captured from the camera to detect and track objects in the camera's sight. The system calculates coordinates of every tracked object relative the user's head. For every such object a corresponding sound is generated. Finally the generated sounds are positioned in the 3D space according to calculated coordinates. This process repeats until the user stops it. • Actors: • Configuration User - activates the sensory substitution (UC-4) by pressing the "Activate" button • Trigger: System start up. • Main Success Scenario: • When the system starts up it loads the main components and ensures that a SSR is running and available. • Load profile (UC-3). • Configuration User activates the sensory substitution (UC-4) by pressing the "Activate" button. The sensory substitution is active until deactivated. • Alternative flows and Exceptions: • 1.a. If SSR is not available display appropriate message and exit. • 1.b. If camera is not found display appropriate message and exit.

  19. דוגמא 3 (מבחן מועד א' 2013) • UC-2: Perform Experiment • Summary: Experiment represents a task that researcher gives to the End User in order to evaluate system performance and system usability. After the researcher explains the End User what should he do in current task, the researcher selects an experiment that will be performed or defines a new one by typing in its description. After the experiment is selected it starts. During the experiment, the researcher can change the settings or stop the experiment and return to the welcome screen. • Actors: • End User - performs the experiment and gains experience by using the system. • Researcher – defines an experiment and monitors the performance of the End User. • Configuration User – helps with starting the system and selecting user profile. • Trigger: Researcher presses the “Experiment” button located on the welcome screen.

  20. דוגמא 3 (מבחן מועד א' 2013) • UC-2: Perform Experiment • Main Success Scenario: • If it is the first experiment task with current End User the UC-1 (“Explore Surroundings”) is executed. • The researcher presses the “Experiment” button located on the welcome screen. • The experiment screen is presented to the researcher and he is asked to select one. • A timer window is presented. • The researcher asks the End User to begin the task and starts the timer which causes the Translation process to begin (UC-4). • The researcher stops the timer • The translation process is stopped (see UC-4) • The researcher enters the experiment task results and observations. • Alternative flows and Exceptions: • 3.a. The researcher did not find the right experiment. • The researcher selects add new experiment. • The researcher fills in the experiment task description. • 8.a. The experiment task was not performed as expected. • The researcher does not enter the results and restarts the use case.

  21. דוגמא 3 (מבחן מועד א' 2013) • 4. (5 נק) דני רוצה להקל על המשתמשים לבצע מספר ניסויים (משימות) עם אותו נסיין, בלי לבחור כל פעם פרופיל משתמש. הצע דרך לעשות זאת ואם נדרש תקן את תרשים ה-Use Case. • 8.b. The researcher wants to perform additional experiment task. • 5. (2 נק) על איזה חלק של תיאור תרחיש UC-4משפיעה אלטרנטיבה זו? בצע את התיקון.

  22. דוגמא 3 (מבחן מועד א' 2013) • 4. (5 נק) דני רוצה להקל על המשתמשים לבצע מספר ניסויים (משימות) עם אותו נסיין, בלי לבחור כל פעם פרופיל משתמש. הצע דרך לעשות זאת ואם נדרש תקן את תרשים ה-Use Case. • 8.b. The researcher wants to perform additional experiment task. • 1. The researcher enters the experiment task results and observations • 2. The presses the Next button • 3. Translation (or sensory substitution (UC-4)) is started • 4. The use case starts over from step 3 • 5. (2 נק) על איזה חלק של תיאור תרחיש UC-4משפיעה אלטרנטיבה זו? בצע את התיקון. • התיאור משפיע על ה-trigger

  23. דוגמא 3 (מבחן מועד א' 2013) • UC-4: Sensory Substitution • Summary: The core of a sensory substitution process, which allows the End User to understand what, appears in an image, by playing 3D-sounds in the appropriate positions around him. This use-case occurs as a part of the “Explore Surroundings” use-case (see UC-1). • Image Processing component processes the received image and takes the relevant visual information out of it. The received information is transferred to the Sound Creation unit which generates sound samples. The created sounds are transferred to the Sound Positioning unit which outputs them to the End User via headphones. • Actors:The End User – experiences sensory substitution. • Trigger:End User clicks the Activate button • 6. (2 נק) האם יזום התרחיש הגיוני? ______. אם נדרש תקן את תיאור התרחיש ואת התרשים.

  24. דוגמא 3 (מבחן מועד א' 2013) • UC-4: Sensory Substitution • Summary: The core of a sensory substitution process, which allows the End User to understand what, appears in an image, by playing 3D-sounds in the appropriate positions around him. This use-case occurs as a part of the “Explore Surroundings” use-case (see UC-1). • Image Processing component processes the received image and takes the relevant visual information out of it. The received information is transferred to the Sound Creation unit which generates sound samples. The created sounds are transferred to the Sound Positioning unit which outputs them to the End User via headphones. • Actors:The End User – experiences sensory substitution. • Trigger:End User clicks the Activate button • 6. (2 נק) האם יזום התרחיש הגיוני?. אם נדרש תקן את תיאור התרחיש ואת התרשים. • יזום התרחיש אינו הגיוני.תיקון: • Trigger : • Configuration User clicks the Activate button • Researcher clicks the Next button while performing experiment

More Related