2.5 Airline Learning Activity [20 minutes]

Private Fields and Methods
1.Read the class members and visibility [15 minutes]

Create the requested diagrams in Violet. This is a diagramming assignment: use the written requirements as evidence; do not submit a C# project.

Copy exact diagram text from the literal spans without typing their surrounding markers. Put relationship names on connecting lines and branch conditions on arrows.

Use the following declarations as the source for the class members. The passenger-list field is represented by an association line in the class diagram. No constructor, readonly field, or property is required.

Classes to represent
using System.Collections.Generic;

public class Gate
{
    private string number;
    private bool hasSkyway;
    private List<Passenger> passengers;

    public void ConfirmArrival(string gateName)
    {
    }

    private void CheckLuggage()
    {
    }
}

public class Passenger
{
    public string Name;
}
A Create Gate and Passenger class boxes

In Gate's attribute compartment write - number: string and - hasSkyway: bool. In its operation compartment write + ConfirmArrival(gateName: string) and - CheckLuggage(). In Passenger's attribute compartment write + Name: string. Leave the other unlisted compartments empty.

B Represent the private custom-type field on an association

Draw Gate → Passenger labeled - passengers. Put 1 at the Gate endpoint and * at the Passenger endpoint. Do not duplicate passengers in Gate's attribute compartment; the association line represents the private list field.

C Check each member separately

Gate has two private fields, one private passenger-list association, one public operation, and one private helper operation. Passenger.Name is public. Do not turn gateName into a field or add a Jet class.

Save and Submit
2.Save, check, and submit your diagrams [5 minutes]
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.