title: Additional Methods that do not work?
body: <p>I realize I can put my data in the method that my constructor is calling and that it will work.
  However I am just messing with some code and I am trying to have additional methods do the calculations. This is a problem from a book, and since I do not have an instructor to bug for a few weeks I figured I would ask here.</p>
  
  <p>Any input? Please and thank you</p>
  
  <pre><code> using System;
   using System.Collections.Generic;
   using System.Linq;
   using System.Text;
  
   namespace ConsoleApplication305
  {
  class Program
  {
      static void Main(string[] args)
      {
          Trip a = new Trip();
          Console.WriteLine(a);
  
      }
  
      class Trip
      {
          int distanceTraveled;
          double costGas;
          int numberGallon;
          int mpg;
          double cpm;
  
          public int DistanceTraveled
          {
              get
              {
                  return distanceTraveled;
              }
          }
          public double CostGas
          {
              get
              {
                  return costGas;
              }
          }
          public int NumberGallon
          {
              get
              {
                  return numberGallon;
              }
          }
  
          public Trip()
          {
              distanceTraveled = 312;
              costGas = 3.46;
              numberGallon = 10;
  
          }
  
          public void milesPerGal()
          {
              mpg = distanceTraveled / numberGallon;
          }
  
          public void costPerMile()
          {
              cpm = costGas * mpg;
          }
  
          public override string ToString()
          {
              return String.Format("The distance traveled is...{0} \nThe cost per gallon of gasoline is... {1} \nThe amount of gallons were... {2} \nThe miles per gallon attained were... {3} \nThe cost per MPG were... {4}", distanceTraveled, costGas, numberGallon, mpg, cpm);
          }
      }
  }
  </code></pre>
  
  <p>}</p>