Question: 1 . Define a BankAccount class that has accNum ( int ) Balance ( double ) A constructor Four methods o deposit o withdraw o

1.Define a BankAccount class
that has
accNum (int)
Balance (double)
A constructor
Four methods
o deposit
o withdraw
o getAccNum
o getBalance
2. Implement a test class
TestBankAccount that
Initialize an BankAccount
instance with initial values:
deposit: 500.0
accNum: 1001
Deposit 30.50
Withdraw 50.0
Print out the remaining
balance
45

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!