コード例 #1
0
        private void btnBuyTrip_Click(object sender, EventArgs e)
        {
            string planeCode = txtPlaneCode.Text;
            string origin = txtOrigin.Text;
            string dest = txtDest.Text;
            string depTime = txtDepTime.Text;
            string arrTime = txtArrTime.Text;
            double prices = Convert.ToDouble(txtPrices.Text);

            AirCraft custCraft = new AirCraft(planeCode, origin, dest, depTime, arrTime, prices);
            Trips custTrip = new Trips(custCraft, numOfSeat);
            Reservation custReserve = new Reservation(custTrip, theCust, tripType);
        }
コード例 #2
0
 public void setTrip( Trips trip)
 {
     this.trip = trip;
 }
コード例 #3
0
 public Reservation(Trips t, Customer cust, string type)
 {
     setTrip(t);
     setCust(cust);
     setTripType(type);
 }