Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Liem Le | COSC2436 #2 -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: Le, Liem Account Number: 1567794657 Current Balance: 500.0 DEPOSIT -Calculate the new balnce then display output (if deposit amount is 200) Account Name: Le, Liem Account Number: 1567794657 Deposit amount: 200.0 New Balance: 700.0 WITHDRAW -Calculate new balance then display the message (for example withdraw amount is 300) Account Name: Le, Liem Account Number: 1567794657 Withdraw amount: 300.0 New Balance: 400.0 PRINT MONTHLY STATEMENT -dIsplay the following output: Account Name: Le, Liem Account Number: 1567794657 End Balance: 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 1. Open new account 2. Check current balance 3. Deposit 4. Withdraw 5. 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..

Liem Le | COSC2436 #3 LAB2 PART2 Requirement -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_yourLastName and 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: Account type: Checking Account Account Name: Le, Liem Account Number: 1567794657 New account balance: 500.0 OR Account type: Saving Account 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 type: Checking Account Account Name: Le, Liem Account Number: 1567794657 Current Balance: 500.0 OR Account type: Saving Account Account Name: Le, Liem Account Number: 1567794657 Current Balance: 500.0 DEPOSIT -Calculate the new balnce then display output (if deposit amount is 200) Account type: Checking Account Account Name: Le, Liem Account Number: 1567794657 Deposit amount: 200.0 Current Balance: 700.0 OR Account type: Saving Account Account Name: Le, Liem Account Number: 1567794657 Deposit amount: 200.0 Current Balance: 700.0 WITHDRAW

Liem Le | COSC2436 #4 -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: Le, Liem Account Number: 1567794657 Withdraw amount: 300.0 Current Balance: 400.0 OR Account type: Saving Account Account Name: Le, Liem Account Number: 1567794657 Withdraw amount: 300.0 Current Balance: 400.0 -If the withdraw amount is invalid, display the output as belows: Account type: Checking Account Account Name: Le, Liem Account Number: 1567794657 Withdraw amount: 690.0 - denied Current Balance: 700.0 OR Account type: Saving Account Account Name: Le, Liem Account Number: 1567794657 Withdraw amount: 660.0 - denied Current Balance: 700.0 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: 10 Account Name: Le, Liem Account Number: 1567794657 End balance: 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: 0.5 Interest amount: 2.0 Account Name: Le, Liem Account Number: 1567794657 End balance: 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 1. Open new account 2. Check current balance 3. Deposit 4. Withdraw 5. 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

Liem Le | COSC2436 #5 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

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

Step: 3

blur-text-image

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

Advances In Spatial And Temporal Databases 8th International Symposium Sstd 2003 Santorini Island Greece July 2003 Proceedings Lncs 2750

Authors: Thanasis Hadzilacos ,Yannis Manolopoulos ,John F. Roddick ,Yannis Theodoridis

2003rd Edition

3540405356, 978-3540405351

More Books

Students also viewed these Databases questions

Question

Write a Python program for binary search for an ordered list

Answered: 1 week ago

Question

2. Describe why we form relationships

Answered: 1 week ago

Question

5. Outline the predictable stages of most relationships

Answered: 1 week ago