|
How can an application program (such as main()) change the balance of a CheckingAccount object? A good answer might be:By using the methods such as processDeposit() and processCheck() that have been written for that purpose. | |
Access Methods
A class with private data controls access to that data
by using
access methods.
An access method is a method which uses the private data of its class
and is visible to other classes .
Some access methods alter data; others return a value
but don't alter data.
Here is a
(If you want to run this program, copy and paste from the previous page and this page into Notepad.) | |
QUESTION 3:
What access methods are used in |