title: Using a method with a custom type Feature parameter
body: <p>So I have three classes because I am trying to practice how to use custom type object and I ran into a problem. In my Auto class I made a method called showFeature() and I want the method to take in one parameter which would be the custom type Feature and it would print out the name and cost of the feature (Ex: The feature pants costs: 3000.0). But when I made the method it keep saying  expected on the last quotation of Feature. Can anyone help me with this problem</p>
  <pre><code>public class Feature
  {
      public String name;
      public double cost;
      public Feature(String s, double d){
          //step 1
          name = s;
          cost = d;
      }
      //step 4
  }
  
  
  </code></pre>
  <pre><code>public class TestAuto
  {
     public static void main(String args[]){
      //instantiate an Auto object
      Auto at = new Auto(&quot;AMG&quot;, 73.5);
  
      //instantiate a Feature object
      Feature fe = new Feature(&quot;Leather Seat&quot;, 3000);
  
      //execute method addFeature with Feature object
      at.showFeature(fe);
  
      //prepare a new Feature object for receving information
      Feature fe1 = new Feature(&quot;&quot;, 0);
  
      //Run method discountValue with a feature and a new value
      fe1 = at.discountValue(&quot;GPS&quot;, 15000, 0.2);
  
      //print out the object
      System.out.println(fe1);
     }
  }
  
  
  
  </code></pre>
  <pre><code>public class Auto
  {
      public String name;
      public double size;
      public Auto(String s, double sz){
          name = s;
          size = sz;
      }
      //step 2: method showFeature()
      public Feature showFeature(Feature){
          
          System.out.println(&quot;The feature &quot; +s+&quot; costs: &quot;+d);
          
      }
      public Feature discountValue(String s, double c, double d){
      //Step 3: method to give discount on cost
          double f = c - d;
          return f;
      }
  }
  
  
  
  
  </code></pre>