Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

UML Sequence Diagram B: A Small ProgramSince these are your first sequence diagrams, this example will keep things simple. Draw a sequence diagram based on

UML Sequence Diagram B: A Small ProgramSince these are your first sequence diagrams, this example will keep things simple. Draw a sequence diagram based on the code that follows
class SeqDia1{
private static double hmmm(double x){ return x*3.14; }
private static double bar(double x, double y){ return x + hmmm(y); } private static double foo(double x, double y, double z){ double result = bar(x+z, x+y); return bar(result+y, y); }// main() is to simply demonstrate calling the above // should you want to compile and run this program public static final void main(String[] args){ System.out.println("Output: "+ foo(432.,-5,5432.12)); }}In particular you want three lifelines here: foo(), bar(), and hmmm()If one was discussing the operation sequence of foo() then foo() and bar() matter.In this case, you are to also draw this diagram with a lifeline for hmmm() as it matters (for this part of this assignment).Draw the synchronous "call" arrows modelled after the code above.i.e., don't draw a lifeline for main() or any arrows that call foo() from main(). Clearly some code calls foo()--this diagram is concerned what foo() does --not what the callers are doing with what foo() returns.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions

Question

Graph the solution set to the inequality. y > 2x

Answered: 1 week ago