In the section discussing private and fileprivate concerning class CheckAccount, the following statement is made:
“Right now, nothing is preventing a haphazard coder who doesn’t read the documentation from creating a Check
on their own. In your safe code, you want a Check
to only originate from CheckingAccount
so that it can keep track of balances.”
Since Check is local to CheckingAccount, I cant see how a coder can initialize a Check from
outside of CheckingAccount.
Thanks
Sam