Account
data:
Lois
Bidder
1567083
784.56
Account
methods:
Balance?
Deposit
Withdrawal
Mutator
Used
to
change
the
value
of
a
eld
from
outside
of
the
object
Could
be
a
simple
method
that
assigns
a
value;
oEen
called
a
set
method
Could
be
more
complex
such
as
our
withdrawal
method
which
requires
some
checks
Mutator
acct1.setName(Rick Rudd);
acct1.deposit(18.91);
public void setName(String
nm){
name = nm;
}
public void deposit(double
amt){
balance = balance + amt;
}
Constructors
Used
to
instanUate
objects
Called
using
the
keyword
new
class name
required keyword
name = null
number = 0
balance = 0.0
acct1
name = null
Steve Amett
number = 0
845201
balance = 0.0
128.00
acct1
name = null
number = 0
0.0
balance = 128.00