Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create Java application for Centennial Banking! Create a class named BankAccount with the following specifications: 5 instance variables that would store the following player data

Create Java application for Centennial Banking!

Create a class named BankAccount with the following specifications:

  1. 5 instance variables that would store the following player data (Use recommended variable naming conventions and data type for given):
    • Account Holder Name (String) -- USER INPUT
    • Account Pin for Access (Int) -- USER INPUT
    • Account Balance in CAD (Double) -- USER INPUT
    • Account Number (Long/Int) -- RANDOMLY GENERATED at OBJECT creation between 1000-2000
    • Account Type (ENUM) (Chequing, Savings, RRSP, TFSA) -- USER INPUT
  2. Create constructors that will allow you to construct a BankAccount. Default and Parameterized. Minimum 2 Constructors.
  3. Create Setters and Getters for all the instance variables of BankAccount Class
  4. A method that will calculate and return the Maximum Loan Amount. Maximum Loan Amount Calculation Logic: If the account is Chequing or Savings -> 30% of Account Balance If the account is TFSA -> 40% of Account Balance If the account is RRSP -> 0
  5. A method to DEPOSIT an amount. Add the given amount to the account balance.
  6. A method to WITHDRAW an amount. Subtract the given amount from the account balance.
  7. A method that will print all the Bank Account Details in proper Format including MAX LOAN AMOUNT on the console.

Create the BankDriver class that would

Create 5 Bank Accounts with User Input in the most concise way with BankAccount Details that are marked (USER INPUT) and store them in an array. Use Common Method for input. Display Random Welcome Message from an array ["Welcome to Centennial Bank", "How can we help you today?", "How can we serve your needs today", "Welcome to your own developed Bank"] After that display the Main Menu with the following options:

  1. Deposit Amount to an account
  2. Withdraw an Amount from an account
  3. Print Account Details
  4. Print All Account Details
  5. Print Max Loan Amount Details
  6. Exit the app

Main Menu Working:

  • If the user chooses options 1-5 process that option according to the information given in Feature Section and display the MAIN MENU AGAIN.
  • If the user enters other value print the INVALID OPTION ERROR MESSAGE On-screen and display the MAIN MENU AGAIN.

Feature Section:

  1. Deposit an Amount to the bank account Ask for the Account Pin for authentication. Find and match using the array. ----> If successful ask for the amount to deposit. Add the amount to account balance for THAT ACCOUNT and display the MAIN MENU AGAIN. ----> If fails, print Authentication Error and display the MAIN MENU AGAIN.
  2. Withdraw an Amount from the bank account Ask for the Account Pin for authentication. Find and match using the array. ----> If successful ask for the amount to withdraw. Deduct the amount from the account balance for THAT ACCOUNT if the balance is greater than the withdrawal amount and display the MAIN MENU AGAIN. ----> If fails, print Authentication Error and display the MAIN MENU AGAIN.
  3. Print Account Details Ask for the Account Pin for authentication. Find and match using the array. ----> If successful print the account details and display the MAIN MENU AGAIN. ----> If fails, print Authentication Error and display the MAIN MENU AGAIN.
  4. Print Maximum Loan Amount Detail Ask for the Account Pin for authentication. Find and match using the array. ----> If successful print the max loan amount and display the MAIN MENU AGAIN. ----> If fails, print Authentication Error and display the MAIN MENU AGAIN.
  5. Print All Account Details anddisplay the MAIN MENU AGAIN.
  6. Exit the app (Break out of your loop )

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Programming questions

Question

=+a) What were the factors and factor levels?

Answered: 1 week ago

Question

What is privacy? How is privacy related to security?

Answered: 1 week ago

Question

What is an OODBMS?

Answered: 1 week ago

Question

What is meant by concurrent update?

Answered: 1 week ago