2.5 Airline Learning Activity

Airline 2.5: Private Fields and Methods

Create the requested diagrams in Violet. This is a diagramming assignment: read the supplied C# or requirements as evidence; do not submit a C# project. Each code excerpt is a focused example with its inputs and existing types explained nearby.

Copy exact diagram text from the literal spans without typing their surrounding markers. Put relationship names on connecting lines and branch conditions on arrows. The named instances help you follow identity; the values inside a box describe its current state.

1.Read the focused class declarations

This complete Gate definition uses an existing Jet class whose only relevant public field is Name of type string. Method bodies are empty because this task concerns member visibility, not their algorithms. No constructor, readonly field, or property is required.

Airline source to diagram
public class Gate
{
    private string number;
    private bool hasSkyway;
    private Jet plane;

    public void ConfirmArrival(string gateNumber)
    {
    }

    private void CheckLuggage()
    {
    }
}
A Create Gate and Jet class boxes

In Gate's attribute compartment write - number : string and - hasSkyway : bool. In its operation compartment write + ConfirmArrival(gateNumber : string) : void and - CheckLuggage() : void. Jet contains + Name : string.

B Represent the private custom-type field on an association

Draw Gate → Jet labeled - plane. Put 0..1 at the Jet endpoint because this declaration does not initialize or require a non-null target. Do not duplicate plane in Gate's attribute compartment. Leave the Gate-end multiplicity unspecified because the source imposes no exclusive owner count.

C Check each member separately

Gate has two simple private fields, one private reference role, one public operation, and one private helper operation. Only public visibility is shown on Jet.Name. Do not change the method parameter gateNumber into another field.

Save and Submit
2.Save, check, and submit your diagrams
A Save the required Violet diagram files

Submit one class diagram. Use Airline 2.5 LastName as the base filename, replacing LastName with your last name. For multiple diagrams of the same type, add a short scenario label to distinguish them. Keep Violet's generated .violet.html extension and diagram-type suffix.

B Check scope, labels, and paths before packaging

Check every exact label, field type, direction, multiplicity, value, and reference target against this page. Open the saved files in Violet and inspect for missing connections, unreadable crossings, or clipped text.

C ZIP the saved diagram files

Put the diagram files at the ZIP root, not inside another folder. Name the archive Airline 2.5 LastName.zip. Do not include C# snippets, unrelated assignments, or instructor reference files.

D Submit the ZIP to the Feedback System

Use the matching Airline activity. Review the feedback, correct your diagrams, save, rebuild the ZIP, and resubmit as needed.

E Submit the resulting feedback URL to Canvas

Paste the resulting URL into the matching Canvas assignment. Keep your editable Violet files for later work.