title: How to do an add method for objects in an ArrayList
body: <p>So for an assignment in my programming class, we are supposed to make an ArrayList to store objects of a class created in a previous assignment. My only problem is that i'm not exactly sure how to make an add method for an object in java. </p>
  
  <p>The class that we are making objects from is a class designed to give information about different cars. Here's the code for this class here:</p>
  
  <pre><code>public class NewCar
  {
     String year;
     String make;
     String model;
     String _year;
     String _make;
     String _model;
     double sticker_price = 0;
     double discount = 0;
     double sales_tax = 0;
     int months = 0;
     double final_price = 0;
  
  
     public NewCar(String _year, String _make, String _model)
     {
        year = _year;
        make = _make;
        model = _model;
     }
  
     public double calcFinalPrice(double _sticker_price, double _discount, double _sales_tax)
     {      
        return final_price = ((_sticker_price - _discount) + _sales_tax *(_sticker_price - _discount));
     } 
  
     public double calcZeroPctMonPayt(int _months)
     {
        return (final_price / 6);
     }
  }
  </code></pre>
  
  <p>Our professor expects us to use the calcFinalPrice method on each new object that we enter into the ArrayList as well, but I'm confused as to how to go about this in a singular method. The only ArrayList example we've done in class was a simple String type shopping list so i'm completely confused as to how to make a list of Objects. </p>
  
  <p>Here's what I have so far, if someone could explain to me what's supposed to go into the add method to achieve the professors desired results I'd be super appreciative!</p>
  
  <pre><code>import java.util.*;
  import java.util.ArrayList;
  
  public class NewCarList
  {
     private ArrayList&lt;NewCar&gt; carList = new ArrayList&lt;NewCar&gt;();
  
     public void add()
     {
  
     }
  }
  </code></pre>