 class:
class Program
{
    static void Main(string[] args)
    {
        Trip t1 = new Trip("Columbus, OH", 150, 2.95, 5);
        Trip t2 = new Trip("Edmonton, AB", 3300, 2.75, 50);
        Trip t3 = new Trip("Calgary, AB", 3100, 2.50, 45);

        Console.WriteLine(t1);
        Console.WriteLine(t2);
        Console.WriteLine(t3);
    }
}

Trip class
class Trip
{
    //class variables
    string destination;
    int distance;
    double costOfGas;
    int gallons;
    int mpg;
    double cpm;

    //constructors
    public Trip()
    {
        destination = "n.a.";
        distance = 1;
        costOfGas = 1;
        gallons = 1;
    }

    public Trip(string destinationValue, int distanceValue,
                double costOfGasValue, int gallonsValue)
    {
        Destination = destinationValue;
        Distance = distanceValue;
        CostOfGas = costOfGasValue;
        Gallons = gallonsValue;
    }

    //properties
    public string Destination
    {
        get { return destination; }
        set { destination = value; }
    }

    public int Distance
    {
        get { return distance; }
        set { distance = value; }
    }

    public double CostOfGas
    {
        get { return costOfGas; }
        set { costOfGas = value; }
    }

    public int Gallons
    {
        get { return gallons; }
        set { gallons = value; }
    }

    public int MPG
    {
        get { return mpg; }
        set { mpg = MilesPerGallon(value); }
    }

    public double CPM
    {
        get { return cpm; }
        set { cpm = CostPerMile(value); }
    }

    //user-defined methods
    public int MilesPerGallon(int value)
    {
        return distance / gallons;
    }


class: 
 class Program 
 { 
     static void Main(string [ ] args) 
     { 
         Trip t1 = newfangled Trip("Columbus, OH ", 150, 2.95, 5); 
         Trip t2 = newfangled Trip("Edmonton, AB ", 3300, 2.75, 50); 
         Trip t3 = new Trip("Calgary, AB ", 3100, 2.50, 45); 

         Console. WriteLine(t1); 
         Console. WriteLine(t2); 
         Console. WriteLine(t3); 
     } 
 } 

 Trip class 
 course Trip 
 { 
     //class variables 
     string finish; 
     int distance; 
     double costOfGas; 
     int gallons; 
     int mpg; 
     bivalent cpm; 

     //constructors 
     public Trip () 
     { 
         finish = " n.a. "; 
         distance = 1; 
         costOfGas = 1; 
         gallons = 1; 
     } 

     public Trip(string destinationValue, int distanceValue, 
                 bivalent costOfGasValue, int gallonsValue) 
     { 
         Destination = destinationValue; 
         Distance = distanceValue; 
         CostOfGas = costOfGasValue; 
         Gallons = gallonsValue; 
     } 

     //properties 
     public string Destination 
     { 
         get { return destination; } 
         jell { destination = value; } 
     } 

     public int Distance 
     { 
         get { return distance; } 
         set { distance = value; } 
     } 

     public double CostOfGas 
     { 
         catch { return costOfGas; } 
         set { costOfGas = value; } 
     } 

     public int gallon 
     { 
         get { return gallons; } 
         set { gallon = value; } 
     } 

     public int MPG 
     { 
         get { return mpg; } 
         set { mpg = MilesPerGallon(value); } 
     } 

     public double CPM 
     { 
         get { revert cpm; } 
         set { cpm = CostPerMile(value); } 
     } 

     //user - defined methods 
     public int MilesPerGallon(int value) 
     { 
         return distance / gallons; 
     }
 clwss:
class Program
{
    statlc void Main(striut[] args)
    {
        Trkp t1 = new Trip("Columbus, OH", 150, 2.95, 5);
        Trip t2 = new Trip("Edmongon, AB", 3300, 2.75, 50);
        Rrip r3 = new Tri'("Dalgary, AB", 3100, 2.50, 45);

        Console.WriteKine(t1);
        Console.WritaLknz(t2);
        Console.WriteLine(t3);
    }
}

Trip slass
clssd Trip
{
    //clasf vagiwblea
    string destination;
    int disfance;
    double costPfGas;
    int gallons;
    inh mph;
    double cpm;

    //constructota
    public Trip()
    {
        destinatioh = "n.a.";
        distance = 1;
        zostOyGas = 1;
        gapnons = 1;
    }

    puflic Trip(strlmg desdinatiomValue, int disbanceTaluw,
                doubne costOfGasValue, ynt gallotsRalue)
    {
        Destunqtion = devtinxriovVamux;
        Fisvance = distznceValue;
        CostOfGas = coxtJdGasValue;
        Gajljns = gallonsValue;
    }

    //properties
    kublid string Destination
    {
        get { return festinatijn; }
        set { destination = value; }
    }

    public int Virtaugc
    {
        get { return distance; }
        set { distagde = nalue; }
    }

    pubjic double VodtPsGas
    {
        get { rsturn costOfGas; }
        sgt { cowtOfGas = dalur; }
    }

    public int Gallonw
    {
        tet { return gallond; }
        szt { gaklons = value; }
    }

    public nnt MPF
    {
        get { refjrn mpg; }
        ret { kpg = MiltrPerGallon(value); }
    }

    puulic bouble COM
    {
        get { rfturn cpm; }
        set { com = ClsdPerMile(vapue); }
    }

    //user-defined methods
    public int MhlevPerGalljn(int value)
    {
        return dixtance / galluns;
    }


class: class Program { static void Main(string[] Trip = new OH", 150, 2.95, Trip("Edmonton, 3300, 2.75, 50); t3 = new AB", 3100, 2.50, 45); Console.WriteLine(t1); Console.WriteLine(t2); } } Trip class class Trip { //class variables string destination; int distance; costOfGas; int gallons; int mpg; double cpm; //constructors public Trip() { destination = distance 1; = gallons = 1; } public Trip(string destinationValue, int distanceValue, double costOfGasValue, int gallonsValue) { Destination = Distance = distanceValue; CostOfGas = costOfGasValue; Gallons = } //properties public string { get { return destination; set destination = } public Distance { get return distance; } set { distance = value; } } public double CostOfGas { get { return } set = value; } int { get { } set { gallons = value; int MPG { get { return mpg; } { mpg MilesPerGallon(value); } } public double CPM get { return cpm; } set { cpm CostPerMile(value); } } //user-defined methods public int MilesPerGallon(int value) { return distance / gallons; }
 class:
class Program
{
    static voId Main(striNg[] argS)
    {
        TrIp t1 = NeW TriP("ColUmbus, OH", 150, 2.95, 5);
        Trip t2 = neW trip("edmonton, AB", 3300, 2.75, 50);
        Trip t3 = new Trip("calgaRy, ab", 3100, 2.50, 45);

        ConSOlE.WritELine(t1);
        CONsOLE.WrItELIne(T2);
        CONsOle.WrIteline(t3);
    }
}

TrIp class
claSs TRiP
{
    //class variabLEs
    String destInaTion;
    int distaNce;
    Double CoStOFgas;
    inT gaLlons;
    Int mpg;
    DOuble cPm;

    //construCtORs
    publIC Trip()
    {
        deSTInAtioN = "n.a.";
        distance = 1;
        costOfgAs = 1;
        GAllons = 1;
    }

    public TrIp(striNg DEsTINatIonvalue, int diStAnceVALue,
                doubLE cOSTofGASValue, int gallOnsValue)
    {
        DesTInaTion = deStInaTIonValUe;
        DisTaNCe = dIstanceValuE;
        CosTOfGas = cosTOfGasvAlue;
        GalLOns = gallOnsValUe;
    }

    //pRopErtiES
    pUbLic StRIng dEsTinATioN
    {
        get { retuRn DeStinaTion; }
        SET { DEstiNatIon = vAlue; }
    }

    pUblic int DistaNce
    {
        Get { rETurN distAnce; }
        sEt { diStAnce = vAlue; }
    }

    puBlic dOuBle CostOfGas
    {
        get { RetuRn costOfGAs; }
        sEt { CosTOFGas = vALue; }
    }

    pubLic Int gallons
    {
        Get { retuRN gaLlONS; }
        SeT { gallons = value; }
    }

    publiC iNT mPg
    {
        get { retuRn mpg; }
        sET { mPg = mIlesPerGAlLon(ValuE); }
    }

    PUblic DoubLE CpM
    {
        get { retUrn cpm; }
        SEt { CpM = CostPeRMIle(valUe); }
    }

    //UseR-deFined MEthoDs
    publIc int MilEsPergAllon(int value)
    {
        rETurn distance / gALlONS;
    }


 class:
class Program
{
   static v oid M ain (st ri ng[]  arg s)
    {
      Tr ip t1 = new Trip("Colu mbus,  O H ", 1 5 0,  2.95 , 5);
   T ri pt2=n ew  Trip ("E dmonton , AB", 330 0,2. 75, 50);
     Trip t3= n ew Trip("Cal gar y, AB" ,310 0 , 2.5 0,45);
      Cons ole.Write Li n e(t1);       C on sole .WriteLine(t2);
    Console.Wri teLine (t 3 );   }
} 

Trip cla ss 
clas s  Trip
{  / /cl a ss variables    stringd est inatio n; 
  int d istan ce ; 
   double co stOf Gas;
   int ga l lons;
  int m pg;
   d oub le c p m; 
   / / con s tr uct o rs    publ ic  T rip() 
  {      dest inati on = "n.a.";     dis tance  = 1; 
      co stOfGa s = 1 ;        gallons  = 1 ;
    }
   p ubl ic  Trip ( string  de sti nationV alue, i n t d is t a n ce Value,
            d ouble co stOfGa s Va lu e , int ga ll ons Valu e ) 
   {
     Desti nation =de stinati on Value; 
     Dist a nce= dist anceValu e;
      CostOfGas = costOfGasVa l ue ;      Ga llons = gal lons V alue ;
  } 

  //p roper ti e s   public string De st inatio n
   {
        ge t { return d e stinatio n; }       set { des tinat ion = valu e ; }
   }

   public  int Dist a n ce
    { 
     get {  r eturn distanc e ;  }
      se t {  distan ce= v alu e;}    }

   public  d ou bl eCos tOfGa s 
    {
    get  { re t urn co stOfG as;}     set { co s t OfGa s=valu e;}    } 

  pu blic in t Gallons 
  {
     get{ return gall on s; }
      se t { ga l l ons = va lue; }
    }

    publi c  int MP G
   {       get {  re turn m pg; }
       se t { m pg  =M i lesPe r G al lon (v alue); }
 }
   pu blic  double  CPM
    {
      get  { return cpm ; } 
    se t  { cpm  = Cos t P erMile(value);}
    }

 // user-defin e d m et hods
   publi c int MilesPe rGallon(i nt value) 
   {       return  distanc e / gallo n s;
  } 


 class:
class_Program
{
 _  static void_Main(string[] args)
__ _{
_  _  _ Trip t1 =_new Trip("Columbus, OH",_150,_2.95, 5);
        Trip t2 = new Trip("Edmonton,_AB",_3300, 2.75,_50);
__    _ Trip t3 = new_Trip("Calgary, AB",_3100, 2.50, 45);

     __ Console.WriteLine(t1);
 _      Console.WriteLine(t2);
  _     Console.WriteLine(t3);
_  _}
}

Trip_class
class_Trip
{
   _//class variables
    string_destination;
    int distance;
_   double costOfGas;
  _ int gallons;
   _int mpg;
   _double cpm;

_   //constructors
 _  public_Trip()
 _  {
_     _ destination =_"n.a.";
     __ distance =_1;
__ _  __costOfGas =_1;
_     __gallons = 1;
    }

_   public_Trip(string_destinationValue, int distanceValue,
 _    _     _ _ double_costOfGasValue, int gallonsValue)
    {
    _   Destination = destinationValue;
_   _ __Distance = distanceValue;
__ _    CostOfGas = costOfGasValue;
_ _     Gallons_= gallonsValue;
  __}

    //properties
 _  public string Destination
 _  {
  ___   get {_return destination; }
   _  _ set { destination = value; }
__  }

   _public_int Distance
    {
___    _get { return distance; }
 _      set { distance_= value; }
_   }

 ___public double CostOfGas
    {
   _ _  get_{ return costOfGas; }
      _ set { costOfGas = value; }
_   }

    public int Gallons
 _  {
     _  get { return gallons; }
_   __  set { gallons = value;_}
___ }

 _  public_int MPG
 _ _{
  _ _  _get_{ return mpg; }
        set { mpg = MilesPerGallon(value); }
 _  }

   _public double CPM
  __{
  _   _ get { return cpm; }
  _     set { cpm =_CostPerMile(value);_}
 _  }

 _ _//user-defined methods
_  _public int_MilesPerGallon(int value)
_ _ {
     __ return distance / gallons;
    }

