Beispiel #1
0
 /// <summary>
 ///Method Name:GetCarClass
 /// Description://Use the all functionality of Car class
 /// Author:bhumi
 /// Created On:25/5/2015
 /// </summary>
 public void GetCarClass()
 {
     objcar   = new Car();
     objconst = new ConstantMessage();
     objcar.Drive();
     Console.WriteLine(objcar);
 }
Beispiel #2
0
 /// <summary>
 ///Method Name:Drive7_11
 /// Description://method of IFuelConsumption interface
 /// Author:bhumi
 /// Created On:27/5/2015
 /// </summary>
 int IFuelConsumption.Drive7_11()
 {
     objconst = new ConstantMessage();
     Console.WriteLine(objconst.strcountkm + " Car");
     kilometer = Convert.ToInt32(Console.ReadLine());
     Console.WriteLine("km Car:" + kilometer);
     return(kilometer);
 }
Beispiel #3
0
        //Method of interface
        int IFuelConsumption.Drive7_11()
        {
            objconst = new ConstantMessage();
            int kilometer;

            Console.WriteLine(objconst.strcountkm + "for Armored Vehicle");
            kilometer = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("km Armored Vehicle " + kilometer);
            return(kilometer);
        }
Beispiel #4
0
 /// <summary>
 ///Method Name:Destruct
 /// Description://Method of specific namespace & class
 /// Author:bhumi
 /// Created On:27/5/2015
 /// </summary>
 void vehicle.Destruct()
 {
     objconst = new ConstantMessage();
     try
     {
         Console.WriteLine(objconst.strvehiclenotdestroy);
         throw new VehicleCannotBeDestroyedException(strvehicleexception);
     }
     catch (VehicleCannotBeDestroyedException ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
Beispiel #5
0
 ConstantMessage objconst;//object creation
 /// <summary>
 ///Method Name:Drive
 /// Description://method of Car class
 /// Author:bhumi
 /// Created On:25/5/2015
 /// </summary>
 public void Drive7_10()
 {
     try
     {
         objconst = new ConstantMessage();
         Console.WriteLine(objconst.strcarmotion);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
     finally
     {
         objconst = null;
     }
 }
Beispiel #6
0
 /// <summary>
 ///Method Name:NoFuelExe
 /// Description://Method for throw the Exception
 /// Author:bhumi
 /// Created On:27/5/2015
 /// </summary>
 public void NoFuelExe()
 {
     objconst = new ConstantMessage();
     throw new NoFuelLeftException();
 }
Beispiel #7
0
 /// <summary>
 ///Method Name:Drive72
 /// Description://method of Car class
 /// Author:bhumi
 /// Created On:25/5/2015
 /// </summary>
 public void Drive72()
 {
     objconst   = new ConstantMessage();
     objvehicle = new Vehicle();
     Console.WriteLine(objconst.strcarmotion);
 }
Beispiel #8
0
 void IVehicle.Destruct()
 {
     objconst = new ConstantMessage();
     Console.WriteLine(objconst.strcardestruct);
 }
Beispiel #9
0
 /// <summary>
 ///Method Name:Drive
 /// Description://Method of specific namespace & class
 /// Author:bhumi
 /// Created On:25/5/2015
 /// </summary>
 public void Drive()
 {
     objconst = new ConstantMessage();
     Console.WriteLine(objconst.strcarmotion);
 }