Create three separate activity diagrams in Violet: a boarding check, gate selection, and passenger loading. For each task, learn the concept with the soccer pages, read the Airline C#, then use the exact labels and drawing instructions to build the matching activity diagram.
This assignment models simplified airline rules. Submit diagrams, not a C# project. When exact text appears in a literal span, copy only the enclosed text, without the markers or quotation marks. Use standard unlabeled start and final nodes.
First learn how C# chooses one branch, then learn how to draw the same behavior using a soccer example.
This is a reading-and-diagramming task, not a programming submission. The following statements belong inside an existing boarding method. The Boolean inputs DigitalBoardingPass, PhysicalBoardingPass, and AirlineEmployee report which credentials the person has.
For this model, ShowPhone, ShowPass, and ShowBadge each represent showing the named credential. EnterPlane represents entering the plane, and ExitTerminal represents leaving the terminal. These supplied operations take no arguments; do not implement them for this assignment. Each credential branch calls EnterPlane after its credential action. In the diagram, combine those identical continuations into one shared Enter plane action.
if (DigitalBoardingPass)
{
ShowPhone();
EnterPlane();
}
else if (PhysicalBoardingPass)
{
ShowPass();
EnterPlane();
}
else if (AirlineEmployee)
{
ShowBadge();
EnterPlane();
}
else
{
ExitTerminal();
}Digital boarding pass?
Label the arrow to the phone action with: true
Label the arrow to the next decision with: false
Physical boarding pass?
Its arrow to the pass action must be labeled: true
Its arrow to the next decision must be labeled: false
Airline employee?
Its arrow to the badge action must be labeled: true
Its arrow to the terminal-exit action must be labeled: false
Show phone Show pass Show badge
Connect all three credential action boxes to one shared action box with this exact label, then connect it to the final node: Enter plane
false branches. Connect it directly to the final node. Do not connect this path to the plane-entry action.Exit terminal
false branches.Learn the C# selection, then follow the soccer code-to-diagram workflow before starting Airline gate selection.
The string input AirlineName already contains exactly one of these supported names: Delta, American Airlines, or United. GoToGate takes a gate number and represents directing the passenger to that gate. This is a supplied operation; you do not implement it here.
This deliberately limited model has no default section. For an unsupported name, C# would skip every case and continue after the switch without directing the passenger. Diagram only the three supported inputs for this assignment, matching the supplied end-state diagram. Do not copy the soccer example's default route into this model.
switch (AirlineName)
{
case "Delta":
GoToGate(5);
break;
case "American Airlines":
GoToGate(7);
break;
case "United":
GoToGate(10);
break;
}AirlineName?
Delta American Airlines United
Delta Go to Gate 5
American Airlines Go to Gate 7
United Go to Gate 10
Begin with repetition in general, then read the while syntax and the diagramming lesson. Complete the early-exit example in the diagramming lesson before drawing the full-plane route.
PassengersRemaining is an existing nonnegative integer. PlaneFull is a supplied Boolean-returning operation: PlaneFull() checks whether all seats are occupied. AllowOnPlane represents boarding one passenger and updates the model's occupied-seat count, so a later PlaneFull() check can have a different answer. CloseDoor represents closing the door. Do not implement these operations for this diagramming task.
The statement PassengersRemaining--; means the same as PassengersRemaining = PassengersRemaining - 1;. It records one fewer waiting passenger after AllowOnPlane. The statement break; exits the loop immediately; it does not skip CloseDoor after the loop.
while (PassengersRemaining > 0)
{
if (PlaneFull())
{
break;
}
AllowOnPlane();
PassengersRemaining--;
}
CloseDoor();PassengersRemaining > 0?
Label the arrow that continues to the plane-capacity decision with: while
Label the arrow that exits the loop condition with: done
while path, add a second decision node with this exact label:Plane full?
Label the full-plane arrow with: true
Label the not-full arrow with: false
The full-plane arrow leads to an action box with this label: break
The not-full arrow leads to an action box with this label: Allow on plane
Connect it to another action box labeled: PassengersRemaining--
break action to an action box with this exact label. The done arrow from the loop-condition decision must also lead to this same action box. Connect it to the final node.Close door
PassengersRemaining > 0? so the condition is checked again after the count decreases.while and done labels and the plane-full decision arrows are labeled with the exact true and false labels. The true path must go through break and Close door; the false path must allow one passenger on the plane, decrease the count, and return to the loop condition.