コード例 #1
0
 public Car(string make, string model, string color, int maximumOccupancy, double fuelEfficiency, Odometer counter, FuelTank tank)
 {
     Make             = make;
     Model            = model;
     Color            = color;
     MaximumOccupancy = maximumOccupancy;
     FuelEfficiency   = fuelEfficiency;
     Counter          = counter;
     Tank             = tank;
 }
コード例 #2
0
 // Constructors
 public Car()
 {
     Make             = "Toyota";
     Model            = "Camry";
     Color            = "blue";
     MaximumOccupancy = 4;
     FuelEfficiency   = 7;
     Counter          = new Odometer(999990);
     Tank             = new FuelTank(40);
 }