Esempio n. 1
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. 2
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);   
 
     
 }
Esempio n. 3
0
 public void CreateChart(int numberOfRows)
 {
     seatChart = new SeatChart();
     seatChart.SeedSeatChart(numberOfRows);
 }