Esempio n. 1
0
        public string A320ticketSales()
        {
            int firstClassPrice;
            int econPrice;
            int totalFirstClass;
            int totalEcon;
            int totalSold;
            int seatsAvail;

            A320 a = new A320("", 0, 0, "", "", "", "", DateTime.Now, DateTime.Now);
            Passenger aPassenger = new Passenger();
            

            for (int i = 0; i < a.capacity;  i++)
            {
                write.writeFlightA320(aPassenger.passengerInfo().ToString());
                read.readFlightA320();
            }
            firstClassPrice = 500;
            totalFirstClass = firstClassPrice * a.firstClass;
            econPrice = 250;
            totalEcon = econPrice * a.economy;
            totalSold = totalFirstClass + totalEcon;
            seatsAvail = (a.firstClass + a.economy) - a.capacity;
            return ("First Class Price $" + firstClassPrice + Environment.NewLine + "Economy Class Price $" + econPrice + Environment.NewLine + "Total tickets Sold " + a.capacity + Environment.NewLine + "Total Sales $" + totalSold + Environment.NewLine + "Seats Available: " + seatsAvail);
        }
Esempio n. 2
0
 public string A320()
 {
     A320 a320 = new A320("", 0, 0, "", "", "", "", DateTime.Now, DateTime.Now);
     return a320.ToString();
 }