Question: Create a class called Account . This will hold things that are true for all account types. Be sure to include at least: An attribute

Create a class called Account. This will hold things that are true for all account types. Be sure
to include at least:
An attribute which will hold the account number.
An attribute which will hold the account balance. (e.g. $500.22)
A constructor method which opens the account with a balance of 0.
It should set the account number using the static variable described above.
An overloaded constructor which opens the account with a specific amount which is
passed to the constructor.
It should set the account number using the static variable described above.
Getter method for accessing the account_number.
Getter/Setter method for accessing the account balance.
A withdrawal method which takes a parameter of the amount to be withdrawn and
deducts it from the balance.
A deposit method which takes a parameter of the amount to be deposited and adds it to
the balance

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!