Question: PART1 Requirement - write JAVA program Create a project named FA2018_LAB2PART1_yourLastName Then add a data type class named Account_yourLastName and a driver class named BankService_yourLastName
| PART1 Requirement - write JAVA program Create a project named FA2018_LAB2PART1_yourLastName Then add a data type class named Account_yourLastName and a driver class named BankService_yourLastName -DATA TYPE CLASS: Provide UML and the code of data type class Account_yourLastName to hold the information of an account with account number (String), customer name (String), address, balance (double) with no-argument constructor, parameter constructor Also, define some methods to handle the tasks: open account, check current balance, deposit, withdraw, and print monthly statement OPEN ACCOUNT -display the output: (for example with accout last name is Le, accout first name is Liem, account number is 1567794657, and balance is 500) |
Account Name: Le, Liem
Account Number: 1567794657
New Account balance: 500.0
CHECK BALANCE Display the output as belows: (for example current balance is 500)
Account Name:
Account Number:
Current Balance:
Le, Liem
1567794657
500.0
DEPOSIT -Calculate the new balnce then display output (if deposit amount is 200)
Account Name:
Account Number:
Deposit amount:
New Balance:
Le, Liem
1567794657
200.0
700.0
WITHDRAW -Calculate new balance then display the message (for example withdraw amount is 300)
Account Name:
Account Number:
Withdraw amount:
New Balance:
PRINT MONTHLY STATEMENT -dIsplay the following output:
Account Name:
Account Number:
End Balance:
Le, Liem
1567794657
300.0
400.0
Le, Liem
1567794657
400.0
-DRIVER CLASS: provide the pseudo-code or flowchart then write the code for the BankService_yourLastName to provide the application of a bank service that provide the following menu of tasks: MAIN MENU
Open new account
Check current balance
Deposit
Withdraw
Print monthly statement
0. Exit
Task 1: Open new account: -After reading all information of customer entered from the keyboard to create an account -Ask for the money amount down to open account. -then display the output as by calling the method open account from class Account_yourLastName
FROM TASK2 TO TASK5, IF THE ACCOUNT IS NOT OPEN YET, DISPLAY MESSAGE YOU HAVE TO OPEN ACCOUNT BEFORE SELECTING THIS TASK THEN CALL THE TASK 1 TO OPEN NEW ACCOUNT
Task 2: Check current balance
-use the current account to call method from the data type classs to display message about the current balance
Task 3: Deposit
-Ask how much users want to deposit then call the method deposit of class Account_yourLastName
Task 4: Withdraw
-Ask how much users want to withdraw then call the method withdraw of class Account_yourLastName
Task 5: Print monthly statement
-call the method print monthly statemet of class Account_yourLastName
EXIT When users exit display the message box:
Thank you. The application is terminating..
| PART2 Requirement write JAVA program -Create a project named FA2018_LAB2PART2_yourLastName -Add a data type class named Account_yourLastName and a driver class named BankService_yourLastName as part 1 -Re-use the UML and code of class Account_yourLastName of part1 to have the class Account_yourLastName ADD 2 NEW DATA TYPE CLASSES -Add 2 other data type classes name CheckingAccount_yourLastNameand SavingAccount_yourLastName that will be the child classes of the parent class Account_yourLastName -Create UML and write the code for two child classes. Data members, constructors, all other methods of two child classes inherit from the parent class Account_yourLastName (See topic Inheritance from QA to know How to write the code of the child class inherit from the parent class) CLASS CheckingAccount_yourLastName DATA MEMBER add field serviceFee (double) CLASS SavingAccount_yourLastName DATA MEMBER add field interestRate(double) OPEN ACCOUNT -Minimum amount of Checking Account is $20, minimum amount of Saving Account is $50 -if money amount to open account is less than minimum amount then display the message: Invalid open account amount Otherwise display the message:
OR Account type: Checking Account Account Name: Account Number: New account balance: Le, Liem 1567794657 500.0 Account type: Account Name: Account Number: New account balance: CHECK BALANCE Display the output as belows: (for example current balance is 500) OR Account Name: Account Number: Current Balance: Account type: Account Name: Account Number: Current Balance: Le, Liem 1567794657 500.0 Saving Account Le, Liem 1567794657 500.0 OR Account Name: Account Number: Deposit amount: Current Balance: Account type: Account Name: Account Number: Deposit amount: Current Balance: Le, Liem 1567794657 200.0 700.0 Saving Account Le, Liem 1567794657 200.0 700.0 Account type: Checking Account DEPOSIT -Calculate the new balnce then display output (if deposit amount is 200) Account type: Checking Account Saving Account Le, Liem 1567794657 500.0 WITHDRAW -The invalid withdraw amount is the amount that make the balance lower than minimum amount -if the withdraw amount is valid then print out the output as belows (for example withdraw amount is 300) Account type: Checking Account Account Name: Account Number: Withdraw amount: Le, Liem 1567794657 300.0 |
| OR Current Balance: Account type: Account Name: Account Number: Withdraw amount: Current Balance: 400.0 Saving Account Le, Liem 1567794657 300.0 400.0 -If the withdraw amount is invalid, display the output as belows: OR Account Name: Account Number: Withdraw amount: Current Balance: Account type: Account Name: Account Number: Withdraw amount: Current Balance: Le, Liem 1567794657 690.0 - denied 700.0 Saving Account Le, Liem 1567794657 660.0 - denied 700.0 Account type: Checking Account PRINT MONTHLY STATEMENT - if it is checking account , calculate the end balance with service fee (for example service fee is $10) -dIsplay the following output: Account type: Checking Account Service Fee: Account Name: Account Number: End balance: 10 Le, Liem 1567794657 390.0 OR - if it is saving account, calculate the interest amount and the end balance with interest rate (for example interest rate is 0.5%) -display the following output: Account type: Saving Account Interest rate: Interest amount: Account Name: Account Number: End balance: 0.5 2.0 Le, Liem 1567794657 402.0 -DRIVER CLASS: provide the pseudo-code or flowchart then write the code for the BankService_yourLastName to provide the application of a bank service that provide the following menu of tasks: MAIN MENU Open new account Check current balance Deposit Withdraw Print monthly statement 0. Exit Task 1: Open new account: -Create an object of class Account_yourLastName, for example object named account -display the sub menu to allow users select account type: 1. Checking Account 2. Saving Account -Read account type the apply Polymorphism, using the object of class Account_yourLastName account to create new Checking account or new Saving account If it is checking account, ask for service fee then create the Checking Account If it is saving account, ask for interest rate then create the Saving Account -Ask for the money amount down to open account. -then display the output as by calling the method open account from class CheckingAccount_yourLastName or class SavingAccount_yourLastName FROM TASK2 TO TASK5, IF THE ACCOUNT IS NOT OPEN YET, DISPLAY MESSAGE YOU HAVE TO OPEN ACCOUNT BEFORE SELECTING THIS TASK THEN CALL THE TASK 1 TO OPEN NEW ACCOUNT |
Task 2: Check current balance
-use the current account to call method from the data type classs to display message about the current balance
Task 3: Deposit
-Ask how much users want to deposit then call the method deposit of class Account_yourLastName
Task 4: Withdraw
-Ask how much users want to withdraw then call the method withdraw of class Account_yourLastName
Task 5: Print monthly statement
-call the method print monthly statemet of class Account_yourLastName
EXIT When users exit display the message box:
Thank you. The application is terminating..
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
