No.
public
Visibility Modifier
The private
visibility modifier keeps outsiders from looking in.
However,
the methods intended for outsiders
must be visible to outsiders.
Use the public
access modifier for them.
Here is a skeleton of the CheckingAccount
class:
public class CheckingAccount { private String accountNumber; private String accountHolder; private int balance; private int useCount = 0; CheckingAccount( String accNumber, String holder, int start ) { . . . . } void incrementUse() { . . . . } int getBalance() { . . . . } void processDeposit( int amount ) { . . . . } void processCheck( int amount ) { . . . . } }
Pick a visibility modifier for the constructor and for each of the methods.