Question: Show that the BankAccount(double initialBalance) constructor is not strictly nec essary. That is, if we removed that constructor from the public interface, how could a
Show that the BankAccount(double initialBalance) constructor is not strictly nec essary.
That is, if we removed that constructor from the public interface, how could a programmer still obtain BankAccount objects with an arbitrary balance?
Conversely, could we keep only the BankAccount(double initialBalance) constructor and remove the BankAccount() constructor?
Step by Step Solution
3.52 Rating (179 Votes )
There are 3 Steps involved in it
Sure lets tackle this step by step First we need to understand the concept of constructors in objectoriented programming OOP specifically in Java In Java a constructor is a block of code that initiali... View full answer
Get step-by-step solutions from verified subject matter experts
