Exemplo n.º 1
0
 /// <summary>
 /// 車子的建構子
 /// </summary>
 /// <param name="enBrand">廠牌</param>
 /// <param name="iYear">出廠年份</param>
 /// <param name="iCC">排氣量</param>
 /// <param name="enFuelType">燃油方式</param>
 /// <param name="sEngineNumber">引擎號碼</param>
 public Car(myEnum.Brand enBrand, int iYear, int iCC, myEnum.FuelType enFuelType, string sEngineNumber)
 {
     Brand        = enBrand;
     Year         = iYear;
     CC           = iCC;
     FuelType     = enFuelType;
     EngineNumber = sEngineNumber;
 }
Exemplo n.º 2
0
 /// <summary>
 /// HONDA CIVIC 廠牌建構子
 /// </summary>
 /// <param name="iYear">出廠年份</param>
 /// <param name="iCC">排氣量</param>
 /// <param name="enFuelType">燃油方式</param>
 /// <param name="sEngineNumber">引擎號碼</param>
 public CIVIC(int iYear, int iCC, myEnum.FuelType enFuelType, string sEngineNumber)
 {
     CarType      = myEnum.HONDA_CarType.CIVIC;
     Year         = iYear;
     CC           = iCC;
     FuelType     = enFuelType;
     EngineNumber = sEngineNumber;
     Speed        = 0;
     SpeedUp      = 20;
     SpeedLimit   = 200;
 }