// load libraries
using System;
using System.Collections.Generic; //lists
// test things out
public class Program
{
public static void Main()
// create objects, lists, and make sure that the members are working as expected
// create a few airplanes (passenger and cargo)
// add those planes to the airplane
// make sure the planes are truly there
Console.Write("Hello World");
//Airplane a1 = new Airplane();// this won't work because Airplane is abstract
}
// let's do an interface or abstract class
public abstract class Airplane // you can't instatiate this
// fields and propertiies
public string Make;
public string Model;
// methods
public void Fly()
Console.WriteLine("my plane " + Make + Model + "is flying");
public abstract void Load(); // this is like an interface member -> delegation (i.e., someone in the future needs to do this)
//children classes
// a big description
public class Passenger_Plane : Airplane // passanger plane inherits from airplane and needs to implement the abstract members from airplane
// fields and properties
//Method
public override void Load()
Console.WriteLine("Passanger loading");
public class Cargo_Plane : Airplane
//fields and properities
//methods
Console.WriteLine("Cargo loading");
public class Airport
//fields and properties
public string Name;
public string City;
List<Airplane> Airplanes_List = new List<Airplane>();
public void Add(Airplane A) //in the future, if someone wants to add an airplane to our list, they need to give us the airplane
Airplanes_List.Add(A);
// constructor
public Airport(string n, string c) // the way in which we can build new objects
Name = n;
City = c;
Console.WriteLine("Airport is being created" + Name + City);