Question
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:
- 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
- Create constructors that will allow you to construct a BankAccount. Default and Parameterized. Minimum 2 Constructors.
- Create Setters and Getters for all the instance variables of BankAccount Class
- 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
- A method to DEPOSIT an amount. Add the given amount to the account balance.
- A method to WITHDRAW an amount. Subtract the given amount from the account balance.
- 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:
- Deposit Amount to an account
- Withdraw an Amount from an account
- Print Account Details
- Print All Account Details
- Print Max Loan Amount Details
- 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:
- 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.
- 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.
- 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.
- 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.
- Print All Account Details anddisplay the MAIN MENU AGAIN.
- Exit the app (Break out of your loop )
Step 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