title: Banking Account in Java
body: <p>I need some clarification on inheritance concept for school.</p>
  
  <p>I have a super class called Account
  With Attributes: Name, acctNum and balance
  With methods: deposit() and withdraw()</p>
  
  <p>And another class called Saving which is a subclass of Account
  With Attributes: interestRate (with fixed value of 2%)
  With Methods: interestPerYear() and methodB()</p>
  
  <p>And another class called FixedDeposit (This is the one I am not sure about)
  With Attributes: interestRate (with fixed value of 4%)
  With Methods: interestPerYear() and methodB()</p>
  
  <p>So can the fixedDeposit class be a subclass of Saving so that it can inherit the 2 methods interestPerYear() and methodB()? If so how to make the interestRate value used for fixedDeposit to be 4% instead?</p>
  
  <p>interestPerYear() is calculated by balance x interestRate.</p>
  
  <p>Thanks.</p>