I have a parameterized method that is extended from another class. The abstract class Account is the parent, and SavingsAccount inherits the constructor from it. This constructor is a parameterized constructor. I would like to use a conditional to allow (or disallow) certain values into the double init_balance field which would then invoke the super() for the parent constructor.
if(init_balance < minimumBalance){
//Print message to user asking for larger deposit. (is this enough to do?)
}
But the java language asks me to place the invocation to the parent constructor first-thing in the child constructor. So I can't filter through the child constructor what goes into the parent constructor.
Here is my code on gist