Include a private variable of type into represent the account balance. Provide a constructor that has a
Question:
Include a private variable of type into represent the account balance.
Provide a constructor that has a parameter for initial balance and uses it to initialize the account balance.
Provide 3 member functions:
credit - adds an amount passed as an argument to the current balance.
debit - withdraws an amount passed as an argument from the current balance.
get Balance - returns the balance amount.
Create a program (AccountTest.java) that creates two Account objects and validate the methods of the class Account. (Call the methods passing the appropriate values to make sure they produce the expected results.)
Attach your Account.java and AccountTest.java files and submit.
Probability & Statistics for Engineers & Scientists
ISBN: 978-0130415295
7th Edition
Authors: Ronald E. Walpole, Raymond H. Myers, Sharon L. Myers, Keying