Methods definitions: deposit method make deposit into account • Note: be sure the amount to be deposited is not less than zero withdraw method a make withdrawal into the account o this method returns false is current balance is less than the amount to be withdrawn o and it returns true if there is enough balance and subtracts amount withdrawn with balance fundTransfer method a transfers an amount to another account credits the amount to the account being transferred and debit to the account who transferred the amount calculatelnterest • compute for the annual interest of an account and update the new balance cashCheck a cash check and debit balance use the attribute of class CheckingAccount the attribute minimum per check charge added if bal < minbal the attribute charge amount charged per check when bal < minbal Additional requirements: getter and setters in each classes overide the toString method provide another class that test your Savingsaccount and CheckingAccount classes o your test program must: create 2 objects for Savings and 1 object for checking perform a debit and credit for saving (Savings and and Checking) transfer funds from objectA to objectB (Savings) Note: (For further clarifications) • For cash check – payee is whom you issue the check. Cash check is only allowed if there is enough money in the account. Minimum – maintaining balance of the checking account. There is a charge if balance is less than the maintaining balance. BankAccount AccountNumber AccountName balance BankAccount() BankAccount(String acctNum,String acctName,double balance) deposit(double amount) boolean withdraw(double amount) void fundTransfer(BankAccount obj, double amount) CheckingAccount SavingsAccount minimum charge interestRate SavingsAccount() SavingsAccount(String acctNum, String acctName, double balance, double interest) CheckingAccount() CheckingAccount(String acctNum,String acctName, double balance, double minimum, double charge) void cashCheck(String payee, double amount) void calculateInterest() Blue - Class name Yellow - Attributes Orange methods

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter3: Using Methods, Classes, And Objects
Section: Chapter Questions
Problem 17RQ
icon
Related questions
Question

MAKE A JAVA PROGRAM
SEE ATTACHED PHOTOS FOR THE INSTRUCTIONS

Methods definitions:
deposit method
make deposit into account
• Note: be sure the amount to be deposited is not less than zero
withdraw method
a make withdrawal into the account
o this method returns false is current balance is less than the amount to be withdrawn
o and it returns true if there is enough balance and subtracts amount withdrawn with balance
fundTransfer method
a transfers an amount to another account
credits the amount to the account being transferred and debit to the account who transferred the amount
calculatelnterest
• compute for the annual interest of an account and update the new balance
cashCheck
a cash check and debit balance
use the attribute of class CheckingAccount
the attribute minimum
per check charge added if bal < minbal
the attribute charge
amount charged per check when bal < minbal
Additional requirements:
getter and setters in each classes
overide the toString method
provide another class that test your Savingsaccount and CheckingAccount classes
o your test program must:
create 2 objects for Savings and 1 object for checking
perform a debit and credit for saving (Savings and and Checking)
transfer funds from objectA to objectB (Savings)
Note: (For further clarifications)
• For cash check – payee is whom you issue the check. Cash check is only allowed if there is enough money in the account.
Minimum – maintaining balance of the checking account. There is a charge if balance is less than the maintaining balance.
Transcribed Image Text:Methods definitions: deposit method make deposit into account • Note: be sure the amount to be deposited is not less than zero withdraw method a make withdrawal into the account o this method returns false is current balance is less than the amount to be withdrawn o and it returns true if there is enough balance and subtracts amount withdrawn with balance fundTransfer method a transfers an amount to another account credits the amount to the account being transferred and debit to the account who transferred the amount calculatelnterest • compute for the annual interest of an account and update the new balance cashCheck a cash check and debit balance use the attribute of class CheckingAccount the attribute minimum per check charge added if bal < minbal the attribute charge amount charged per check when bal < minbal Additional requirements: getter and setters in each classes overide the toString method provide another class that test your Savingsaccount and CheckingAccount classes o your test program must: create 2 objects for Savings and 1 object for checking perform a debit and credit for saving (Savings and and Checking) transfer funds from objectA to objectB (Savings) Note: (For further clarifications) • For cash check – payee is whom you issue the check. Cash check is only allowed if there is enough money in the account. Minimum – maintaining balance of the checking account. There is a charge if balance is less than the maintaining balance.
BankAccount
AccountNumber
AccountName
balance
BankAccount()
BankAccount(String acctNum,String acctName,double balance)
deposit(double amount)
boolean withdraw(double amount)
void fundTransfer(BankAccount obj, double amount)
CheckingAccount
SavingsAccount
minimum
charge
interestRate
SavingsAccount()
SavingsAccount(String acctNum,
String acctName,
double balance, double interest)
CheckingAccount()
CheckingAccount(String acctNum,String acctName,
double balance, double minimum, double
charge)
void cashCheck(String payee, double amount)
void calculateInterest()
Blue - Class name
Yellow - Attributes
Orange methods
Transcribed Image Text:BankAccount AccountNumber AccountName balance BankAccount() BankAccount(String acctNum,String acctName,double balance) deposit(double amount) boolean withdraw(double amount) void fundTransfer(BankAccount obj, double amount) CheckingAccount SavingsAccount minimum charge interestRate SavingsAccount() SavingsAccount(String acctNum, String acctName, double balance, double interest) CheckingAccount() CheckingAccount(String acctNum,String acctName, double balance, double minimum, double charge) void cashCheck(String payee, double amount) void calculateInterest() Blue - Class name Yellow - Attributes Orange methods
Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT