示例#1
0
        public string MD90TicketSales()
        {
            MD90 m = new MD90("", 0, 0, "", "", "", "", DateTime.Now, DateTime.Now);
            Passenger mPassenger = new Passenger();
            int firstClassPrice;
            int firstClassTotal;
            int econPrice;
            int econTotal;
            int totalSold;
            int seatsAvail;

            for (int i = 0;  i < m.capacity; i++)
            {
                write.writeFlightMD90(mPassenger.passengerInfo().ToString());
                read.readFlightMD90();
            }
            firstClassPrice = 400;
            firstClassTotal = firstClassPrice * m.firstClass;
            econPrice = 200;
            econTotal = econPrice * m.economy;
            totalSold = firstClassTotal + econTotal;
            seatsAvail = (m.firstClass + m.economy) - m.capacity;
            return ("First Class Price $" + firstClassPrice + Environment.NewLine + "Economy Class Price $" + econPrice + Environment.NewLine + "Total Tickets Sold " + m.capacity + Environment.NewLine + "Total Sales $" + totalSold + Environment.NewLine + "Seats Available: " + seatsAvail);
        }
示例#2
0
 public string MD90()
 {
     MD90 md90 = new MD90("", 0, 0, "", "", "", "", DateTime.Now, DateTime.Now);
     return md90.ToString();
 }