예제 #1
0
파일: Car.cs 프로젝트: lyen51032-web/C-
 /// <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;
 }
예제 #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;
 }