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, 22.06.2019 20:00
What side length would you specify if you were required to create a regular hexagonal plate that was composed of 33 cm(squared) of sheet metal? dimension the side length to 0.1 cm
Answers: 2
question
Computers and Technology, 23.06.2019 01:30
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 2
question
Computers and Technology, 23.06.2019 12:40
According to the video what are some tasks petroleum engineers perform check all that apply
Answers: 2
question
Computers and Technology, 23.06.2019 18:00
What can a word user do with the customize ribbon dialog box? check all that apply. minimize the ribbon add a new tab to the ribbon remove a group from a tab add a group to a tab choose which styles appear choose which fonts appear choose tools to appear in a group
Answers: 1
You know the right answer?
Project 15B - BankAccount package: proj15B
class: BankAccount

Create a class call...
Questions
question
Mathematics, 17.12.2020 20:50
question
Mathematics, 17.12.2020 20:50
question
English, 17.12.2020 20:50
question
Mathematics, 17.12.2020 20:50
question
Mathematics, 17.12.2020 20:50
question
Mathematics, 17.12.2020 20:50