0
$\begingroup$

In the use case diagram, we draw use cases as an ellipse. Are the use cases the same as functions? I mean by functions, those functions which we write in the program.Thank you in advance.

$\endgroup$
  • 1
    $\begingroup$ Use case enable you to visualize the different types of roles in a system,however,a function defines a procedure or routine. Some programming languages make a distinction between a function, which returns a value, and a procedure, which performs some operation but does not return a value. $\endgroup$ – quintumnia Jul 27 '18 at 17:13
  • 1
    $\begingroup$ This is actually an English question. $\endgroup$ – Yuval Filmus Jul 28 '18 at 21:55
0
$\begingroup$

The word function has several meanings. One of them is similar to the meaning of use case. Another is mathematical function. Yet another is computer routine. Wiktionary lists a few more.

$\endgroup$
0
$\begingroup$

From my experience use case is what the code is used for and function is what the code does. For example you may have a subroutine that calculates the length of the minnimal path between two nodes in a graph but a specific use case may be to find the minimal length between two points in a maze (when represented as a graph).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.