コード例 #1
0
 public Plane(int id, string name, string type, string color, GeolocationSystem geolocationSystem)
 {
     Id                = id;
     Name              = name;
     Type              = type;
     Color             = color;
     GeolocationSystem = geolocationSystem;
 }
コード例 #2
0
        // A method to add arrived planes to the airport's collection:
        public void AddArrivedPlane(int id)
        {
            Coordinate coordinate = new Coordinate(0, "Airportlocation");
            // Custom made class called GeolocationSystem (which I just came up with) as well as Coordinates:
            GeolocationSystem geolocationSystem = new GeolocationSystem(0, "", "", DateTime.Now, coordinate);

            Planes.Add(new Plane(0, "", "", "", geolocationSystem));
        }