Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In Java [after S$6.4] Bank Account Given the below BankAccount.java file, provide an accompanying BankAccountDriver.java file that exercises (tests) the BankAccount class by calling its
In Java
[after S$6.4] Bank Account Given the below BankAccount.java file, provide an accompanying BankAccountDriver.java file that "exercises" (tests) the BankAccount class by calling its methods. Specifically, your BankAccountDriver class should: Declare and instantiate a BankAccount object. Prompt the user for a customer name. Call setCustomer, passing in the user-entered customer name. Prompt the user for a bank account number Call setAccountNum, passing in the user-entered bank account number. . .Call printAccountInfo. Don't forget to use proper style in your BankAccountDriver.java file (including a prologue section at the top of the file). Write your code so that it works in conjunction with the below class. When run, produce the output shown in the subsequent sample session your program should BankAccount.java Dean& Dean This program stores and prints information for a bank account public class Bank.ccount private String customeri customer's name private nt accountNum; // bank accunt number public void setCustomer (String customer) this.customer-customeri / end setCustomer public void setAccountNum (int accountNum) this.accountNum accountNum; / end setAccountNunm // This method prints a bank account's information public void printAccountInfo( System.out.println( this.customer s account number is"+ this.accountNum".") I/ end printAccountInfo ) // end class BankAccount Customer name: WiIliam Gates ccount number: 123456 illian Gates's account number is 123456Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started