The management of the Habib Bank is looking at automation as a means to save time and effort required to carry out the various banking transactions. In order to achieve this, the management has planned to computerize the following transactions:   Creating a new account Withdrawing money from an account Depositing money in an account   The CEO of the company has hired a team of experts to provide a solution for the same. Consider yourself to be a part of the team that implements the solution for designing the application. Create an application using exceptions to implement the transactions. The application should consist of the following classes. ·       Account.java java java   Each class has a specific purpose and functionality. The descriptions of each class are as follows: Account.java The Account class represents an actual bank account. It stores the following details of a bank account such as customerName, accountNumber, and balance. The instance variables are initialized in the constructor of the class. The Account class will be used by the Bank class to create bank accounts. Bank.java The Bank class stores the bank details of the customer’s account such  as bankId, bankName, and branch. The instance variables are initialized in the constructor of the class. The Bank class implements the following methods:   void displayAccountDetails(Account): This method displays the bank and account details of the account object passed as an argument to the method.   void createAccount(String username, double balance): This method accepts the user name and the opening balance from the user to create a new instance of the Account class.   void withdraw(String accountNumber, double amount): This method is used to withdraw money from an account. The method consists of a try- catch block to throw an exception if the withdrawal amount is greater than the balance.   void deposit(String accountNumber, double amount): This method is used to deposit money in an account. The account number and the amount to be deposited in the account are accepted from the user.                BankTest.java        The BankTest class is the main Java class used to test the Bank class. It creates an instance of the Bank class and accepts the bank and account details from the user. The required method is invoked on the instance of the Bank class based on the user’s selected transaction. The class consists of a try-catch block to check for the format of balance or amount passed by the user to raise the NumberFormatException if the amount is specified as a string. Also, the try- catch block checks for the IllegalArgumentException if the argument supplied to the method is incorrect and the ArrayIndexOutOfBoundsException if the numbers of arguments exceed the required limit

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

The management of the Habib Bank is looking at automation as a means to save time and effort required to carry out the various banking transactions. In order to achieve this, the management has planned to computerize the following transactions:

 

  • Creating a new account
  • Withdrawing money from an account
  • Depositing money in an account

 

The CEO of the company has hired a team of experts to provide a solution for the same. Consider yourself to be a part of the team that implements the solution for designing the application.

Create an application using exceptions to implement the transactions. The application should consist of the following classes.

·       Account.java

  • java
  • java

 

Each class has a specific purpose and functionality. The descriptions of each class are as follows:

Account.java

The Account class represents an actual bank account. It stores the following details of a bank account such as customerName, accountNumber, and balance. The instance variables are initialized in the constructor of the class. The Account class will be used by the Bank class to create bank accounts.

Bank.java

The Bank class stores the bank details of the customer’s account such  as bankId, bankName, and branch. The instance variables are initialized in the constructor of the class. The Bank class implements the following methods:

 

  • void displayAccountDetails(Account): This method displays the bank and account details of the account object passed as an argument to the method.

 

  • void createAccount(String username, double balance): This method accepts the user name and the opening balance from the user to create a new instance of the Account class.

 

  • void withdraw(String accountNumber, double amount): This method is used to withdraw money from an account. The method consists of a try- catch block to throw an exception if the withdrawal amount is greater than the balance.

 

  • void deposit(String accountNumber, double amount): This method is used to deposit money in an account. The account number and the amount to be deposited in the account are accepted from the user.

 

   

 

       BankTest.java

       The BankTest class is the main Java class used to test the Bank class. It creates an instance of the Bank class and accepts the bank and account details from the user. The required method is invoked on the instance of the Bank class based on the user’s selected transaction. The class consists of a try-catch block to check for the format of balance or amount passed by the user to raise the NumberFormatException if the amount is specified as a string. Also, the try- catch block checks for the IllegalArgumentException if the argument supplied to the method is incorrect and the ArrayIndexOutOfBoundsException if the numbers of arguments exceed the required limit.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY