Esempio n. 1
0
 public Flight(AirPlane airPlane, int flightNumber, Origin origin, Destination destination, List<Passenger> passengerManifest)
 {
     this.airPlane = airPlane;
     this.FlightNumber = flightNumber;
     this.origin = origin;
     this.destination = destination;
     this.PassengerManifest = passengerManifest;
 }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Seat seat = new Seat("1A", 300, false);
            SeatChart seed = new SeatChart();
            seed.AddToList(seed.SeedSeatChart(5));
            List<Passenger> flightManifest = new List<Passenger>();
            Passenger initPassenger = new Passenger("", seat);
            flightManifest.Add(initPassenger);

            //passenger chooses origin/destination
            //passenger buys ticket

            //Repeat to fill plane
            // create seatchart for flight
            Origin origin = new Origin("Lima,Peru");
            Destination destination = new Destination("Bogota,Columbia");

            //create flight/airplane
            AirPlane airplane = new AirPlane(100, 300, true, "schedule");
            Flight flight = new Flight(airplane, 4345, origin, destination, flightManifest);




            //


            TextWriter writer = new StreamWriter("Manifest.txt", true);
            writer.Write(seat.getSeatName());
            writer.Close();
            
            




            //Dan.Name = "Dan";
            //Seat seat1 = new Seat("A1", 300, true);
            //Origin Milwaukee = new Origin("Milwaukee");
            //Destination SanDiego = new Destination("San Diego");
            //AirPlane airplane = new AirPlane();
            //Itinerary<object> itinerary = new Itinerary<object>(Milwaukee,SanDiego,airplane,Dan,seat1);
            //MyFileWriter mf = new MyFileWriter();
            //SeatChart seatChart = new SeatChart();
            //Passenger Adam = new Passenger("Adam",seat1);
            //seatChart.populateSeatChart();
            //seatChart.BuySeat(Adam);
            //seatChart.GetAvailableSeats();
            //Console.WriteLine(Adam.ChosenSeat.getSeatName());
            //mf.WriteToFile(Dan,Milwaukee,SanDiego);
 
        
            
        }
Esempio n. 3
0
        public Itinerary(string origin, string destination,AirPlane airplane,Passenger passenger,Seat seat)
        {
            this.OriginationCity = origin;
            this.DestinationCity = destination;
            this.Plane = airplane;
            this.Traveler = passenger;
            this.AssignedSeat = seat;
            List<object> passengerItinerary = new List<object>();
            passengerItinerary.Add(Traveler);
            passengerItinerary.Add(AssignedSeat);
            passengerItinerary.Add(OriginationCity);
            passengerItinerary.Add(DestinationCity);
            passengerItinerary.Add(Plane);

        }
Esempio n. 4
0
 static void Main(string[] args)
 {
     Passenger Dan = new Passenger();
     Dan.Name = "Dan";
     Seat seat = new Seat("3A", 250);
     Origin Milwaukee = new Origin("Milwaukee");
     Destination SanDiego = new Destination("San Diego");
     AirPlane airplane = new AirPlane();
     Itinerary<object> itinerary = new Itinerary<object>(Milwaukee,SanDiego,airplane,Dan,seat);
     MyFileWriter mf = new MyFileWriter();
     SeatChart seatChart = new SeatChart();
     seatChart.populateSeatChart();
     mf.WriteToFile(Dan,Milwaukee,SanDiego);   
 
     
 }