Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Design and implement the following 3 classes with the exact fields and methods (these names and caps exactly): Design and implement the following 3 classes
Design and implement the following 3 classes with the exact fields and methods (these names and caps exactly):
Design and implement the following 3 classes with the exact fields and methods (these names and caps exactly) 1. An abstract class named BankAccount (iava file called BankAccount.java) Filed/Method Balance NumberDeposits NumberWithdrawals AnnuallnterestRate MonthlyServiceCharge BankAccount SetMonthlyServiceCharges A method that accepts the monthly service charges as an argument and set the field value GetBalance GetNumberDeposits GetNumberWithdrawals GetAnnualinterestRate GetMonthlyServiceCharge A method that returns the monthly service charge Deposit Description A field for the bank account balance A field for the number of deposits this month A field for the number of withdrawals this month A field for the annual interest rate A field for the monthly service charge A constructor method that accepts as arguments the balance and the annual interest rate A method that returns the bank account balance A method that returns the number of deposits this month A method that returns the number of withdrawals this month A method that returns the annual interest rate A method that accepts the amount of the deposit as an argument, add the value of that argument to the account balance, and increment the variable holding the number of deposits. A method that accepts the amount of the withdrawal as an argument, subtracts that argument value from the balance, and increment the value holding the number of withdrawals. A method that updates the balance by calculating the monthly interest earned by the account ( MonthlyInterest - Balance Anualinteresthkate) MonthlyInterest) A method that subtracts the monthly service charges from the balance, callas the Calculatelnterest method to calculate the interest, and then sets to 0 the variables for NumberDeposits, NumberWithdrawals, and MonthlyServiceCharge Withdrawa Calculatelnterest , and adding this interest to the balance (Balance= Balance + 12 MonthlyProcess
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