Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Identifying the scenarios

From: Foundations of Programming: Object-Oriented Design

Video: Identifying the scenarios

When we describe a use case scenario, we're typically looking at describing a goal that an actor can accomplish in a single encounter, and we're trying to stay focused on the user's goal, on their intention. So, for example, log in to application might first sound like a use case. It has an active verb, it typically has multiple steps, multiple conditions, you could forget the password or be required to register and so on. But if we emphasize the users focus their goal, we realized that their goal with our system is not to log in, the reason they want to log in is to do something.

Identifying the scenarios

When we describe a use case scenario, we're typically looking at describing a goal that an actor can accomplish in a single encounter, and we're trying to stay focused on the user's goal, on their intention. So, for example, log in to application might first sound like a use case. It has an active verb, it typically has multiple steps, multiple conditions, you could forget the password or be required to register and so on. But if we emphasize the users focus their goal, we realized that their goal with our system is not to log in, the reason they want to log in is to do something.

So what is that something in your system? We're looking for something like Purchase items, Create new document, Balance accounts, these are user-focused goals, each with several steps that could be accomplished in one encounter. Logging in might be part of one of these use cases, part of one of these goals, but it's not a use case in itself. On the other side of the equation, a goal on the level of Write book or Merge organizations would be too broad. Those would involve multiple encounters with whatever application is used.

Now it is true that some people do define these broader and smaller use cases as a way of tying things together, but at least initially. You want to focus on the true user goal use cases, emphasizing the goal of one encounter. Now a simple casual use case can still have multiple scenarios. We've talked about the main successful scenario, that's the one you want to focus on. This is something referred to as the sunny day use case. What happens when everything goes right? But when necessary we describe the alternate paths or extensions.

So in the case of purchasing items we might have a couple of options for what happens when something is out of stock? What happens if the customer payment method is rejected? But you're not trying to envision all the bizarrely unlikely but technically possible events, just the typical situations that would occur and what you want to do with those situations. Again, you could write these as paragraphs, you could write these as numbered steps. We're going for readability and ease of use and ease of creation over formality.

When you're writing, use active voice, omit needless words, omit needless detail. It's very common to see sentences like the system is provided with the payments information and shipping information by the customer, but you could just as easily say customer provides payment and shipping information. Active voice, easier to read, short readable, concise. Another very common thing you'll see, particularly from programmers is there's too much detail. So the system connects to the external payment processor over HTTPS and uses JSON to submit the provided payment information to be validated.

Then waits for the delegated callback response. We're not trying to write pseudocode. This is too much detail. We need this System validates payment information. For a use case, that's absolutely fine. That's more than enough. When you're doing this focus on intention, keep the user interface out of it. A little earlier I had shown a numbered example of a purchase items use case, and even on the first two steps of the scenario, customer chooses to enter the checkout process, and customer is shown a confirmation page for the order allowing them to change quantities, remove items, or cancel.

Well, notice that we're describing this all without the words page, click, button, select, mouse, none of that. There's no click the checkout button. There is no rearrange using JavaScript. We're focusing on the intention. The form of our user interface will follow the function of our application and what we want to do. Now once you have come up with your first set of actors and first set of goals here is just a few more questions to see if you have missed anything. These may prompt new goal scenarios or a new actor.

Who does system administration? If this is a system that needs to be started and stopped or backed up at the weekend or have software updates applied, who does that and how do they interact with the application? Who manages users and security, particularly if you have role-based actors? What happens if the system fails? While the person who reacts to this may not be a classic user, they're certainly an actor. Is anyone looking at performance metrics or system activity or logs? And you will often find that these questions will actually prompt a couple of fairly obvious actors for your application, particularly if it's being developed internal to a company.

And if you're focusing on the actor's goal, the user's intention using active voice, writing short succinct descriptions of the scenarios, that's more than enough to move forward. Once you have a few use cases written, you may find it useful to look at a use case diagram to tie that together, and we'll cover that next.

Show transcript

This video is part of

Image for Foundations of Programming: Object-Oriented Design
Foundations of Programming: Object-Oriented Design

47 video lessons · 50135 viewers

Simon Allardice
Author

 
Expand all | Collapse all
  1. 11m 35s
    1. Welcome
      1m 25s
    2. Who this course is for
      1m 15s
    3. What to expect from this course
      3m 6s
    4. Exploring object-oriented analysis, design, and development
      1m 41s
    5. Reviewing software development methodologies
      4m 8s
  2. 26m 14s
    1. Why we use object-orientation
      2m 42s
    2. What is an object?
      5m 22s
    3. What is a class?
      4m 43s
    4. What is abstraction?
      2m 45s
    5. What is encapsulation?
      3m 45s
    6. What is inheritance?
      3m 35s
    7. What is polymorphism?
      3m 22s
  3. 12m 16s
    1. Understanding the object-oriented analysis and design processes
      4m 13s
    2. Defining requirements
      6m 9s
    3. Introduction to the Unified Modeling Language (UML)
      1m 54s
  4. 23m 35s
    1. Understanding use cases
      6m 11s
    2. Identifying the actors
      4m 16s
    3. Identifying the scenarios
      5m 7s
    4. Diagramming use cases
      4m 18s
    5. Employing user stories
      3m 43s
  5. 16m 36s
    1. Creating a conceptual model
      1m 59s
    2. Identifying the classes
      2m 27s
    3. Identifying class relationships
      2m 38s
    4. Identifying class responsibilities
      6m 43s
    5. Using CRC cards
      2m 49s
  6. 22m 25s
    1. Creating class diagrams
      6m 11s
    2. Converting class diagrams to code
      4m 57s
    3. Exploring object lifetime
      5m 55s
    4. Using static or shared members
      5m 22s
  7. 19m 49s
    1. Identifying inheritance situations
      6m 49s
    2. Using inheritance
      2m 43s
    3. Using abstract classes
      2m 2s
    4. Using interfaces
      4m 20s
    5. Using aggregation and composition
      3m 55s
  8. 9m 23s
    1. Creating sequence diagrams
      5m 18s
    2. Working with advanced UML diagrams
      2m 3s
    3. Using UML tools
      2m 2s
  9. 10m 39s
    1. Introduction to design patterns
      2m 40s
    2. Example: the singleton pattern
      4m 53s
    3. Example: the memento pattern
      3m 6s
  10. 21m 47s
    1. Introduction to object-oriented design principles
      2m 50s
    2. Exploring general development principles
      3m 55s
    3. Introduction to SOLID principles
      6m 43s
    4. Introduction to GRASP principles
      8m 19s
  11. 7m 1s
    1. Reviewing feature support across different object-oriented languages
      3m 50s
    2. Additional resources
      2m 27s
    3. Goodbye
      44s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Foundations of Programming: Object-Oriented Design.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.