title: Main class instance for all subclasses
body: <p>I got three classes: <code>Bank</code>, <code>account</code> and <code>Coin</code>. I want the class <code>Bank</code> to have a default coin variable , which I pass on to its constructor. So I extended account to <code>Bank,</code> this would mean that I can access the default coin variable through the method <code>getmainCoin()</code> via the <code>account</code> class. For some reason I'm getting this error when trying that: </p>
  
  <blockquote>
    <p>Error:(12, 32) java: constructor bank in class com.company.bank cannot be applied to given types;
      required: com.company.Coin
      found: no arguments
      reason: actual and formal argument lists differ in length</p>
  </blockquote>
  
  <pre><code>// Instantiations 
  Coin dollars = new Coin("Dollar", "$");;
  bank SomeBank = new bank(dollars);
  Person john = new Person("John Doe", 20, dollars, new account(9058));
  System.out.println(john.checkbalance());
  
  public class bank {
    public String name;
    private int coinsheld;
    private Coin maincoin;
  
    public bank(Coin maincoin){
        this.maincoin = maincoin;
    }
  
    public Coin getmainCoin(){
        return this.maincoin;
    }
  
  }
  
  public class account extends bank {
    private int balance;
    private static int accounts;
    private int accnumber;
    private Coin coin;
  
    public account(int balance){
        this.balance = balance;
        this.accounts += 1;
        this.accnumber = accounts;
        this.coin = getmainCoin();
    }
  }
  
  public class Coin {
    public static int total;
    private String name;
    private String sign;
    private int id;
  
    public Coin(String name, String sign){
        this.name = name;
        this.sign = sign;
        this.id = total + 1;
    }
  
    public int getID(){
        return this.id;
    }
  }
  </code></pre>