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 05:10
Suppose we have a byte addressable computer that has a 32-byte cache with 8 bytes per block. the memory address is 8 bits long. the system accesses memory addresses (in hex) in this exact order: 6e, b9, 17, e0, 4e, 4f, 50, 91, a8, ab, ad, 93, and 94. (a) assuming the cache is direct mapped, what memory addresses will be in cache block 2 after the last address has been accessed? (b) assuming the cache is direct mapped, what is the hit ratio for the entire memory reference sequence given, assuming the cache is initially empty? (c) assuming the cache is 2-way set associative with a lru replacement policy, what is the hit ratio?
Answers: 3
question
Computers and Technology, 22.06.2019 15:50
The file sales data.xlsx contains monthly sales amounts for 40 sales regions. write a sub that uses a for loop to color the interior of every other row (rows 3, 5, etc.) gray. color only the data area, columns a to m. (check the file colors in excel.xlsm to find a nice color of gray.)
Answers: 2
question
Computers and Technology, 23.06.2019 12:30
How is the brightness of oled of the diaplay is controled
Answers: 1
question
Computers and Technology, 23.06.2019 13:00
Which one of the following voltages should never be measured directly with a vom? a. 1200 v b. 500 v c. 800 v d. 100v
Answers: 2
You know the right answer?
Project 15B - BankAccount package: proj15B
class: BankAccount

Create a class call...
Questions
question
English, 04.09.2020 01:01
question
Spanish, 04.09.2020 01:01
Questions on the website: 13722360