UML sofeware engineer

profileGL25
L10-UseCaseDescriptions.pdf

10/4/2020 1

Lesson 10

Describing Use Cases

“Use Case Descriptions make it very Easy to Design Systems.”

10/4/2020 2

Describing Use Cases

 Basic description

 Expanded Textural Description

 Exceptions

 Conditions

10/4/2020 3

Basic Description  Note the diagram below shows nothing in

detail

 The user needs this detail to understand what really is going on

Student_ Register for Classes

10/4/2020 4

Basic Description  1st, one normally writes a short description

 A student requests to enroll in classes by specifying their student identifier, pin number, and the department code and CRN for each section they wish to enroll.

Student_ Register for Classes

10/4/2020 5

Expanded Textural Description  2nd, one normally writes an expanded

textural specification

Student_ Register for Classes

10/4/2020 6

Expanded Textural Description 1. The student enters their student identifier and pin number. 2. The system returns the students Name. 3. The student enters the department code. 4. The system returns the department name. 5. The student enters the course number for the desired course. 6. The system returns the course title. 7. The student enters the CRN for the desired section. 8. The system returns the meeting time, meeting room, maximum

number seats, professor identifier and professor name. 9. The student requests the section. 10. The system returns a message of success.

10/4/2020 7

Use Case Exceptions

 3rd, one normally writes the exceptions

1. If the student Identifier or pin is not valid, inform the user.

2. If the student is not eligible to enroll inform the user. 3. If the department code is not valid, inform the user. 4. If the CRN is not valid, inform the user. 5. If the section is full, inform the user.

10/4/2020 8

Use Case Conditions  4th, one normally writes the conditions

 They come in two types

 Pre-conditions  State of the system before events take place

 Post-conditions  State of the system after events take place

10/4/2020 9

Use Case Conditions  Pre-conditions

1. There is a student with the given student identifier

2. There is a department with the given department code

3. There is a section with a given CRN

Student_ Register for Classes

10/4/2020 10

Use Case Conditions  Post-conditions

1. An instance of enrollment is created 2. The section is linked to enrollment 3. The student is linked to enrollment 4. The enrollment is linked to section 5. The enrollment is linked to student

Student_ Register for Classes

10/4/2020 11

Summary

 The points about describing use cases are:  Basic description  Expanded Textural Description  Exceptions  Conditions

 Pre  Post

  • Lesson 10
  • Describing Use Cases
  • Basic Description
  • Basic Description
  • Expanded Textural Description
  • Expanded Textural Description
  • Use Case Exceptions
  • Use Case Conditions
  • Use Case Conditions
  • Use Case Conditions
  • Summary