クライアントプログラムは,オブジェクトリファレンスを使用してオブジェクトのオペレーションを呼び出したりオブジェクトに含まれたデータを参照したりします。オブジェクトリファレンスのさまざまな操作方法は,「10.4 オブジェクトリファレンスの操作」で説明します。
. . .
// Invoke the balance operation.
balance = account->balance();
cout <<"Balance is $" << balance << endl;
. . .
. . .
// Invoke the balance operation.
System.out.println(
"The balance in Account1: $" + account1.balance());
. . .