Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 811089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:59:18+00:00 2026-05-15T00:59:18+00:00

In which kind of steps should be we use the return line in a

  • 0

In which kind of steps should be we use the return line in a sequence diagram?

<- - - - - - 
  • 1 1 Answer
  • 4 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T00:59:19+00:00Added an answer on May 15, 2026 at 12:59 am

    The return line represents the flow of control returning from a method/function call

    In the case of methods/functions that return a result, it would indicate a value is being returned.

    E.g.

        result
    <-------------
    

    Otherwise, for void methods/functions it would just be the arrow

    <-------------
    

    For asynchronous calls, as the caller doesn’t yield control to the invoked method/function, I would only use a return line if it returned a result (e.g. non-void methods/functions)

    Hope that helps

    EDIT

    Here is an example of a sequence diagram I created for a search use case
    example of a sequence diagram I created for a search use case http://web10.twitpic.com/img/107669708-1d6f9df82534756bfe2a684d4480cc43.4c00f3b0-full.png

    Note that the Anonymous user only makes asynchronous calls because, as a human being, they do not yield control to the application, hence no return arrows

    Also note the return arrow of the search() call, which returns ‘results’

    Finally, the creation arrows ( ——|> ) do not have return arrows as they implicitly return the instantiated object

    EDIT 2

    In response to your updated question:

    I would not have return arrows for operations by the user, such as login(), as the results are not returned to the user in the same manner as an object, but normally outputted to some kind of UI. Another way of looking at it is that the user is outside the scope of the program, so it doesn’t make sense to return results directly.

    From your diagram, my interpretation (in a kind of pseudocode) would be:

    class User{
        public void login()
        public void sendEmail()
    }
    
    class Patient{
        public void getPatient()
    }
    
    class Doctor{
        public void getDoctor()
    }
    
    class Appointment{
        //This method returns something, but it's not clear what, so I assumed a boolean
        public boolean checkAvailability()
    }
    

    As you can see, all but one of these methods do not return anything. If that’s what you wanted then good, but I suspect that’s not the case.

    I also suspect you did not intend for the sendEmail() method to be in the User class.

    You should also consider what is happening when checkAvailability() returns, as the the flow of control seems to return to User and then inexplicably jump back to Appointment

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Spring Batch process which has following kind of code. <step id=step1
Which kind of Azure diagnositcs log stores the data for webrole instance count change,
I was wondering which kind of expressiveness fits a language used to generate particle
it seems that Markdown.NET does not escape the following: <script> which is kind of
I have a requirement which sounds like kind of simple but hard to implement
I'm writing a web application which contains a kind of schedule. After a certain
I'm scaling onstage MovieClips via AS properties scaleX or scaleY, which kills any kind
At the moment, I have lot's of Java which does all kind of nifty
I have kind of library which uses a bunch of its own perf counters.
I am making a dictionary kind of an app which uses SQLite . I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.