title: Getting variable data from an Engine class isn't working in Java
body: <p>My project is composition, which a Truck HAS-A Engine which can be called using parameters into the console: </p>
  
  <p>(note, engineStatus represent two arguments which would determine the parameter, IE, One or the other would be inputted; On/Off or True/False)</p>
  
  <pre><code>PrimaTruck truck = new PrimaTruck(150, OUColour.RED, (engineStatus));
  </code></pre>
  
  <p>I can't think how to get my second class to get the engineStatus() and insert variables properly into the constructor for use with the console command code above. My main error is that it cannot find the engineStatus variable. </p>
  
  <p>I also acknowledge that my code is wrong for the Engine Boolean expressions and can't figure out a good alternative to give engineStatus() an On or Off variable dependant on if engineStart() and engineStop() are On/Off, thus giving a value that can be entered in the PrimaTrucks() constructor parameters.</p>
  
  <p><strong>PrimaTruck.Java</strong></p>
  
  <pre><code>import ou.*;
   /**
   * Write a description of class PrimaTruck here.
   */
  public class PrimaTruck{
   // instance variables - replace the example below with your own
      private int topSpeed;
      private OUColour colour;
      public Engine engineStatus;
  
    /**
    * Constructor for objects of class PrimaTruck
    * Initialise instance variables 
    */
  public PrimaTruck(int topSpeed, OUColour colour, Engine engineStatus){
  
       this.topSpeed = topSpeed;
       this.colour = colour;
       this.engineStatus = engineStatus;
  }
  
  public void setColour(OUColour aColour){
       this.colour = aColour;
  }
  
  public OUColour getColour(){
    return colour;
  }
  
  public int getTopSpeed(){
    return topSpeed;
  }
  }
  </code></pre>
  
  <p><strong>Engine.Java</strong></p>
  
  <pre><code>/**
   * Write a description of class Engine here.
   */
  public class Engine{
  
  // instance variables
     public Boolean engineStart;
     public Boolean engineStop;
     public String engineStatus;
     private Boolean status;
  
  /**
  * Constructor for objects of class Engine
  */
  public Engine(String engineStatus){
  
  // initialise instance variables
      this.engineStart = engineStart;
      this.engineStop = engineStop;
      this.engineStatus = engineStatus;
      this.status = status;
  }
  
  public Boolean status(){    
      if (engineStart == true){
       status = engineStart;
      }else if (engineStop = true){;
       status = engineStop;
    }
       return this.status;
  }
  
  public Boolean getEngineStart(){
       return engineStart; 
  }
  
  public void setEngineStart(){
       this.engineStop = false;
       this.engineStart = true;
  }
  
  public Boolean getEngineStop(){
       return engineStop; 
  }
  
  public void setEngineStop(){
       this.engineStart = false;
       this.engineStop = true;
  }
  
  public void setEngineStatus(String aStatus){
       this.engineStatus = aStatus;
  } 
  
  public String getEngineStatus(){
       return engineStatus;
  }
  }
  </code></pre>
  
  <p>Any feedback on coding or pointers on how to implement will be appreciated.</p>