Question: Problem Create an Account class (Account.java) that a bank might use to represent a customer's bank account. Specification Include aprivatevariableof type int to represent the
Problem
Create an Account class (Account.java) that a bank might use to represent a customer's bank account.
Specification Include aprivatevariableof type int to represent the account balance.Provide a constructor that has a parameter for initial balanceand 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. getBalance - returns the balance amount. Create a program (AccountTest.java) that creates two Account objects and validatethe methods of the class Account. (Call the methods passing the appropriate values to make sure they produce the expected results.)
AdminGrading 0 points if your program does not compile.+5 for comments, indentation and placement of {} perStyle Guide.+5 for each specification met.
Submission: Attach yourAccount.javaandAccountTest.javafiles and submit.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
