3.4 Airline Learning Activity

Airline 3.4: Inheritance in Class and Object Diagrams

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 inheritance definitions

Aircraft is the base type. Jet and Taildragger are two different derived types; neither inherits from the other. Keep this assignment focused on inherited fields and runtime instances. Do not add abstract operations, interfaces, virtual methods, or overrides until a later requested topic introduces them.

Airline source to diagram
public class Aircraft
{
    public string Name;
    public double LengthInMeters;
}

public class Jet : Aircraft
{
    public int EngineCount;
}

public class Taildragger : Aircraft
{
    public bool TailWheelLocked;
}
Objects after inherited and derived fields are assigned
// Snapshot setup inside an existing method
Jet spirit = new Jet();
spirit.Name = "Spirit of the Forest";
spirit.LengthInMeters = 33.84;
spirit.EngineCount = 2;
Taildragger scout = new Taildragger();
scout.Name = "Field Scout";
scout.LengthInMeters = 7.2;
scout.TailWheelLocked = true;
A Create the three-class hierarchy

Aircraft contains + Name : string and + LengthInMeters : double. Jet contains only its declared field + EngineCount : int. Taildragger contains only + TailWheelLocked : bool. Draw a solid generalization line from each derived class to Aircraft, with a hollow triangle at Aircraft. Leave operation compartments empty in this focused model.

B Create the two-instance snapshot

Draw spirit : Jet with Name = Spirit of the Forest, LengthInMeters = 33.84, and EngineCount = 2. Draw scout : Taildragger with Name = Field Scout, LengthInMeters = 7.2, and TailWheelLocked = true.

C Check that inherited values belong to the derived object

There are two object boxes, not four. Do not draw separate Aircraft objects or inheritance connectors between object boxes. The class view declares fields once in Aircraft; the object view shows their current values inside each actual derived instance.

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

Submit one class diagram and one object diagram. Use Airline 3.4 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 3.4 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.