1.2 Airline Learning Activity

Airline 1.2: Create a Class Diagram Showing Fields and One-to-One References

Create a class diagram from the Airline field definitions below, then save an object snapshot as a second diagram. Add the five classes, show simple fields with their types, and draw the reference fields as one-to-one associations. Read the supplied C# or requirements to build the diagrams; submit Violet diagrams rather than 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. The named instances help you follow identity; the values inside a box describe its current state.

1.Read the Airline field definitions

These complete class definitions describe the focused model. Assume the required reference fields will be assigned to distinct matching objects before this scenario is used. The class diagram models that completed configuration with 1:1 associations; the C# declarations alone do not enforce non-null values or exclusive ownership.

Airline source to diagram
public class Airline
{
    public string Name;
    public int EmployeeCount;
    public Airport Airport;
    public Jet Airplane;
}

public class Airport
{
    public string Name;
    public int Employees;
    public Terminal MainTerminal;
}

public class Terminal
{
    public Gate GateA;
    public Gate GateB;
}

public class Gate
{
    public string Name;
    public bool HasSkyway;
    public bool PlaneSideCheckLuggage;
}

public class Jet
{
    public string Name;
    public string Model;
    public string Manufacturer;
    public double LengthInMeters;
}
2.Create the class diagram
A Create the five class boxes

Use Airline, Airport, Terminal, Gate, and Jet. The design has one Gate class, not a separate class for every gate instance.

B Translate the simple public fields into class attributes

Airline: + Name : string and + EmployeeCount : int. Airport: + Name : string and + Employees : int. Gate: + HasSkyway : bool, + Name: string, + PlaneSideCheckLuggage : bool. Jet: + Model : string, + Manufacturer : string, + Name : string, + LengthInMeters : double.

C Show custom-type reference fields on five separate association lines

Airline → Airport: + Airport. Airline → Jet: + Airplane. Airport → Terminal: + MainTerminal. Terminal → Gate: one line + GateA and another + GateB. Put 1 beside both endpoints of every line. Keep each role name outside the boxes on its line.

D Check type structure rather than snapshot values

Do not put AeroWisco, CWA, 3A, or true into this class diagram. Leave method compartments empty. Check that this class diagram has five class boxes and five association lines. Do not add a Gate-to-Jet association in this module.

Create the Object Diagram Showing the Airline Snapshot
3.Save a 1.2 copy of your Airline 1.1 object diagram

Open your Airline 1.1 object diagram and use Save As to create Airline 1.2 LastName.object.violet.html, replacing LastName with your last name. Preserve the 1.1 file. Keep the six object boxes and all five references; this snapshot has the same state as 1.1.

A Keep the object headings and field values

Use the headings Airline, Airport, Jet, Terminal, and Gate|Number on both gate boxes. The vertical bar is part of each gate heading. Keep field names in Violet's field-name areas and their values in the separate value areas.

Snapshot fields and values
Object Field Value
Airline Name AeroWisco
Airline EmployeeCount 12
Airport Name CWA
Airport Employees 10
Jet LengthInMeters 33.84
Jet Model 319
Jet Manufacturer Airbus
Jet Name Spirit of the Forest
Gate reached through GateA HasSkyway true
Gate reached through GateA Number 3A
Gate reached through GateA PlaneSideCheckLuggage false
Gate reached through GateB HasSkyway false
Gate reached through GateB Number 3B
Gate reached through GateB PlaneSideCheckLuggage true
B Keep all five references attached to their fields

Use Violet's Object reference (from field) tool. Airline's Airplane field points to Jet, and its Airport field points to Airport. Airport's MainTerminal field points to Terminal. Terminal's GateA and GateB fields point to the gates with Number 3A and 3B respectively. Leave each reference-field value area blank. No gate points to Jet yet.

C Check the snapshot separately from the class design

There are six object boxes and five field-reference arrows. Preserve Number in the gate snapshot fields; the class-diagram task above uses Name in its Gate attributes. Do not rename a snapshot field while copying this object diagram.

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

Submit one class diagram and one object diagram. Use Airline 1.2 LastName as the base filename, replacing LastName with your last name. The class and object diagram-type suffixes distinguish the two files. 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 1.2 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.