title: How to use getters and setters in an Abstract Class
body: <p>I have an abstract class <code>Customer</code>.  It's a very simple class, only setting 5 <code>string</code> variables as well as 5 <code>static int</code> variables. Better to show what I mean by this:</p>
  <p>As a disclaimer I made the code as simple as possible, I have more logic involved in my abstract class that doesn't pertain to the question.</p>
  <hr />
  <h3>Abstract Class</h3>
  <pre><code>public abstract class Customer {
       private String Name, Address, Phone, Email, Company;
       public static final int NAME = 0, ADDRESS = 1, PHONE = 2, EMAIL = 3, COMPANY = 4;
  
       public Customer(String Name, String Address, String Phone, String Email, String Company) {
           setValues(Name, Address, Phone, Email, Company);
       }
  
       private void setValues(String Name, String Address, String Phone, String Email, String Company) {
           setName(Name);
           setAddress(Address);
           setPhone(Phone);
           setEmail(Email);
           setCompany(Company);
       }
  //declare public getters and setters methods below
  }
  </code></pre>
  <p>My question is as follows:</p>
  <p>I have a <code>class</code> that <code>extends</code> this <code>abstract class</code> called <code>Customer</code> (different package).  If I set up the <code>constructor</code> in this <code>class</code> as such:</p>
  <hr />
  <h3>Object Class</h3>
  <pre><code>public class Customer extends Main.Customer {
       private String Name, Address, Phone, Email, Company;
  
       public Customer(String Name, String Address, String Phone, String Email, String Company) {
           super(Name, Address, Phone, Email, Company);
       }    
  }
  </code></pre>
  <hr />
  <p>Does this set my <code>String</code> variables as to whatever I pass through the constructor?  As in when I <code>instantiate</code> this <code>class</code> as an <code>object</code>, how would I be able to 'get' a variable from it?<br />
  For example: (Assume <code>String1 -String5</code> are <code>strings</code> of some sort)</p>
  <pre><code>public class Random {
  private Customer customer = new Customer(String1, String2, String3, String4, String5);
  
  }
  </code></pre>
  <p>How would I then call the object later on in the class to return a <code>string</code> (of any single variable).  As in if my <code>abstract class</code> wasn't <code>abstract</code> but the main <code>class</code> I was using to <code>instantiate</code> as an <code>object</code>, I'd get the variable like so:  <code>String name = customer.getName();</code></p>
  <hr />
  <h2>TL;DR:</h2>
  <p>Just unsure how to get <code>variables</code> from an <code>object</code> <code>extending</code> an <code>abstract class</code>.</p>