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, 24.06.2019 06:30
Me and category do i put them in because this is science
Answers: 1
question
Computers and Technology, 25.06.2019 04:30
The word window is an example of a /an
Answers: 1
question
Computers and Technology, 25.06.2019 12:50
Which of the following activities is an example od gathering data by observation
Answers: 3
question
Computers and Technology, 25.06.2019 14:00
The first few lines of a script that say "using" that point the code to the right groups are called
Answers: 1
You know the right answer?
Project 15B - BankAccount package: proj15B
class: BankAccount

Create a class call...
Questions
question
Mathematics, 16.12.2020 19:00
question
English, 16.12.2020 19:00
question
Mathematics, 16.12.2020 19:00
question
Mathematics, 16.12.2020 19:00
question
Arts, 16.12.2020 19:00
Questions on the website: 13722363