I think in your UML diagram for Bank that createAccount is mis-represented and it should be public. It makes no sense to have createAccount private as that means you won't be able to create an account outside of the class and derived classes won't be able to use it either. If createAccount is meant to be used only by derived classes from bank then it could be made protected instead of public - but in terms of your program to test the class it still needs to be public. I would check with your tutor about this.