Example #1
0
 internal Ticket(Expedition expedition, SeatInformation seatInformation, Person passenger, decimal paidAmount)
 {
     this.Expedition      = expedition;
     this.SeatInformation = seatInformation;
     this.Passenger       = passenger;
     this.PaidAmount      = paidAmount;
 }
        public override SeatInformation GetSeatInformation(int seatNumber)
        {
            SeatCategory sCategory = new SeatCategory();
            SeatSection  sSection  = new SeatSection();


            if (seatNumber % 3 == 1)
            {
                sCategory = SeatCategory.Singular;
                sSection  = SeatSection.LeftSide;
            }
            else if (seatNumber % 3 == 2)
            {
                sCategory = SeatCategory.Corridor;
                sSection  = SeatSection.RightSide;
            }
            else
            {
                sCategory = SeatCategory.Window;
                sSection  = SeatSection.RightSide;
            }

            SeatInformation seatInformation = new SeatInformation(seatNumber, sSection, sCategory);

            return(seatInformation);
        }