Ejemplo n.º 1
0
 //Constructor
 public Flight(string fc, string fd, string dT, string dA, string aT, string desA, double price, Airplane plane, HumanResources.Staff st)
 {
     this.flightCode         = fc;
     this.flightDate         = fd;
     this.departureTime      = dT;
     this.departureAirport   = dA;
     this.arrivalTime        = aT;
     this.destinationAirport = desA;
     this.price = price;
     this.plane = plane;
     staff      = st;
     numberOfFlights++;
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            int input;

            Console.WriteLine("OOM - Task 3");
            Console.WriteLine("Flight Management System");
            Console.WriteLine("*****************************************************************************************");

            Console.WriteLine("Staff\n" +
                              "Anzahl der Mitarbeiter (" + HumanResources.Staff.getNumberOfStaff() + ") | " +
                              "Anzahl der FlugbegleiterInnen (" + HumanResources.Crew.getNumberOfCrew() + ") | " +
                              "Anzahl der PilotInnen(" + HumanResources.Pilot.getNumberOfPilots() + ")");

            Console.WriteLine("Airplane\n" +
                              "Anzahl der Flugzeuge (" + Airplane.numberOfPlanes + ")");
            Console.WriteLine("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ");
            Console.Write("Geben Sie Ihre Wahl ein [" +
                          "0 - Beenden\n" +
                          "\t\t\t 1 - Mitarbeiter einfuegen\n" +
                          "\t\t\t 2 - Flugzeug einfuegen\n" +
                          "\t\t\t 3 - Flugdaten einfuegen]: ");
            input = Convert.ToInt32(Console.ReadLine());
            do
            {
                if (input == 1)
                {
                    //Staff
                    HumanResources.Crew  crew_member1   = new HumanResources.Crew("12001", "Dona", "Muster", "female", true, "English");
                    HumanResources.Pilot cabine_member1 = new HumanResources.Pilot("21001", "Emir", "Sinanovic", "Male", true, "Captain", "A320");
                    HumanResources.Pilot cabine_member2 = new HumanResources.Pilot("22002", "Tarik", "Sinanov", "Male", true, "Copilot", "A320");
                    HumanResources.Crew  crew_member2   = new HumanResources.Crew("11002", "Lisa", "Musterfrau", "female", true, "English");
                    HumanResources.Crew  crew_member3   = new HumanResources.Crew("11003", "Maya", "Sinanova", "female", true, "German");
                }
                else if (input == 2)
                {
                    //Airplane
                    Airplane a01 = new Airplane("OE-ATA", "A320", 30, 200);
                    Airplane a02 = new Airplane("OE-ATB", "A190", 20, 170);
                }
                else if (input == 3)
                {
                    if (Flight.numberOfFlights == 0)
                    {
                        Console.WriteLine("Derzeit existieren keine Fluege. Bitte fuegen Sie zuerts Flugzeug und/oder Mitarbeiter ein!");
                    }
                }
                else
                {
                    Console.WriteLine("Ungueltige Eingabe!");
                }

                Console.WriteLine("Staff\n" +
                                  "Anzahl der Mitarbeiter (" + HumanResources.Staff.getNumberOfStaff() + ") | " +
                                  "Anzahl der FlugbegleiterInnen (" + HumanResources.Crew.getNumberOfCrew() + ") | " +
                                  "Anzahl der PilotInnen(" + HumanResources.Pilot.getNumberOfPilots() + ")");

                Console.WriteLine("Airplane\n" +
                                  "Anzahl der Flugzeuge (" + Airplane.numberOfPlanes + ")");


                Console.Write("Geben Sie Ihre Wahl ein [0 - Beenden]: ");
                input = Convert.ToInt32(Console.ReadLine());
            } while (input != 0);
        }