This week's giveaways are in the MongoDB and Jobs Discussion forums. We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line! See this thread and this one for details.
that is my abstract code; here is my subclass checking:
I am trying to complie that but getting this error: accBalance has private access in Account return ((accBalance - 700)* .02)* intrestPeriod; how do I get around this. I am only allowed to have the computeIntrest method take one integer arugment and return a double? I can add another variable to the method but that would violate the rule. can anybody help with this?
Joined: Feb 28, 2007
take accountbalance using the getter method. It is the proper way, you can't access private variables of your parent class.
Joined: Feb 07, 2005
I would make the variables in the superclass that need to be used in the subclass protected.