示例#1
0
        public string BoeingTicketSales()
        {
            Boeing747 b = new Boeing747("", 0, 0, "", "", "", "", DateTime.Now, DateTime.Now);
            Passenger bPassenger = new Passenger();
            int firstClassPrice;
            int firstClassTotal;
            int econPrice;
            int econTotal;
            int totalSold;
            int seatsAvail;

            for (int i = 0; i < b.capacity; i++)
            {
                write.writeFlightBoeing(bPassenger.passengerInfo().ToString());
                read.readFlightBoeing();
            }
            firstClassPrice = 600;
            firstClassTotal = firstClassPrice * b.firstClass;
            econPrice = 300;
            econTotal = econPrice * b.economy;
            totalSold = firstClassTotal + econTotal;
            seatsAvail = (b.firstClass + b.economy) - b.capacity;
            return ("First Class Price $" + firstClassPrice + Environment.NewLine + "Economy Class Price $" + econPrice + Environment.NewLine + "Total Tickets Sold " + b.capacity + Environment.NewLine + "Total Sales $" + totalSold + Environment.NewLine + "Seats Available: " + seatsAvail);
        }
示例#2
0
 public string Boeing747()
 {
     Boeing747 boeing747 = new Boeing747("", 0, 0, "", "", "", "", DateTime.Now, DateTime.Now);
     return boeing747.ToString();
 }