subject

Project 15B - BankAccount package: proj15B
class: BankAccount

Create a class called BankAccount. It should have the following properties:
1. Three state variables:

• double balance… This is how much money is currently in the account.
• String name…The name of the person owning the account.
• int accountNumber... the 8 digit account number
2. Constructor should accept three parameters.

1. One should be a double variable that is used to initialize the state variable, balance.
2. The other should be a String that is used to initialize the state variable, name.
2. The account number (8 digit)
3. Methods:

1. deposit()…returns nothing…accepts a double that is the amount of money being
deposited. It is added to the balance to produce a new balance.
2. withdraw()…returns nothing…accepts a double that is the amount of money
being taken out of the account. It is subtracted from the balance to produce a
new balance.
3. checkBalance()... when this method is used it prints the balance of the bank account.
Create a BankAccount. class that has a main( ) method. In that method you should be able to create a bank account with a name and a starting amount. Once it has been created it will then allow you to make a deposit, withdrawl or check the balance.

When either a deposit, withdrawl or check balance is made the program prints out the name of the account, the amount deposited or withdrawn and the total amount in the account.
Example:

Account Name: Jones
Deposit: $14.56
Account Total: $1405.22

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 11:00
How should you specify box sizes on a web page if you want the boxes to vary according to the font size of the text they contain? a. in pixels b. in inches c. as percentages d. in em units
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
Norder to receive financial aid at his vocational school, mario must fill out the fafsa. the fafsa is a form that must be completed to determine . in order to complete a fafsa, you must submit . the fafsa can students obtain
Answers: 2
question
Computers and Technology, 23.06.2019 16:00
An english teacher would like to divide 8 boys and 10 girls into groups, each with the same combination of boys and girls and nobody left out. what is the greatest number of groups that can be formed?
Answers: 2
question
Computers and Technology, 24.06.2019 16:00
Read these lines from beowulf.often scyld scefing seized mead-benches from enemytroops, from many a clan, he terrified warriors, even thoughfirst he was found a waif, best explains why the author includes this information in theexposition? a. to emphasize that a hero must learn to be fierceb. to remember the famous story of a popular heroc. to express sadness about losing the old heroesd. to see whether people still respect the old heroes
Answers: 1
You know the right answer?
Project 15B - BankAccount package: proj15B
class: BankAccount

Create a class call...
Questions
question
English, 22.11.2019 23:31
question
History, 22.11.2019 23:31
question
Mathematics, 22.11.2019 23:31
question
Mathematics, 22.11.2019 23:31
Questions on the website: 13722360