Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE DO NOT COPY PASTE FROM CHEGG/OTHERWISE I'LL REPORT YOU to Task 1 (50 points): (Bank Account Application) Using classes, design an account list to
PLEASE DO NOT COPY PASTE FROM CHEGG/OTHERWISE I'LL REPORT YOU
to Task 1 (50 points): (Bank Account Application) Using classes, design an account list to keep track of different kinds of accounts with the data fields like id, balance, interest rate, and dateCreated. Your program should create a list using ArrayList and maintain the elements in the list. (a) Design a class named class Account that contains the private data fields id, balance, annualInterestRate, and dateCreated that stores the date when the account was created. It also need to contain a default constructor that creates a default account, a constructor that creates an account with the specified id and initial balance, the accessor and mutator methods for id, balance, and annualinterestRate, the accessor method for dateCreated, a method named getMonthlyInterestRate that returns the monthly interest rate, a method named getMonthlyInterest ( that returns the monthly interest, a method named withdraw that withdraws a specified amount from the account, and a method named deposit that deposits a specified amount the account. (b) Create two subclasses for Checking Account and SavingAccount accounts. The checking account has no interest, a small number of free transactions per month, and additional transactions would be changed a small fee. The saving account should have an annual interest rate 5%. A Checking account has an overdraft limit, but a Savings account cannot be overdrawn. (c) Write a test program TaskXX.java that creates an Account object with an account ID of 5589, $35000a balance of, and an annual interest rate of 3-5%. Use the withdraw method to withdraw, use the deposit method to deposit, and print the balance, the monthly interest, and the date when this account was created. In this test program, create two more objects of savingsAccount, and checkingAccount with their toString methods that describe all instance fields. XX should be replaced with your first name and last name. Note the class TaskXX is not finished in a good shape and you are suggested to add more statements if needed. (d) In the test program, create a ArrayList, add all objects to the list, and use a loop to display all the instance fields in the list by invoking the object's toString method. Grading Rubric 5 points for each class (e.g. Account CheckingAccount, and SavingAccount) with the function to String 0. 5 points for using the Keyword super in the classes Checking and Saving in order to access superclass members in the class Account. -5 points for meeting all requirements. 10 points for the test program ...... 2 to Task 1 (50 points): (Bank Account Application) Using classes, design an account list to keep track of different kinds of accounts with the data fields like id, balance, interest rate, and dateCreated. Your program should create a list using ArrayList and maintain the elements in the list. (a) Design a class named class Account that contains the private data fields id, balance, annualInterestRate, and dateCreated that stores the date when the account was created. It also need to contain a default constructor that creates a default account, a constructor that creates an account with the specified id and initial balance, the accessor and mutator methods for id, balance, and annualinterestRate, the accessor method for dateCreated, a method named getMonthlyInterestRate that returns the monthly interest rate, a method named getMonthlyInterest ( that returns the monthly interest, a method named withdraw that withdraws a specified amount from the account, and a method named deposit that deposits a specified amount the account. (b) Create two subclasses for Checking Account and SavingAccount accounts. The checking account has no interest, a small number of free transactions per month, and additional transactions would be changed a small fee. The saving account should have an annual interest rate 5%. A Checking account has an overdraft limit, but a Savings account cannot be overdrawn. (c) Write a test program TaskXX.java that creates an Account object with an account ID of 5589, $35000a balance of, and an annual interest rate of 3-5%. Use the withdraw method to withdraw, use the deposit method to deposit, and print the balance, the monthly interest, and the date when this account was created. In this test program, create two more objects of savingsAccount, and checkingAccount with their toString methods that describe all instance fields. XX should be replaced with your first name and last name. Note the class TaskXX is not finished in a good shape and you are suggested to add more statements if needed. (d) In the test program, create a ArrayList, add all objects to the list, and use a loop to display all the instance fields in the list by invoking the object's toString method. Grading Rubric 5 points for each class (e.g. Account CheckingAccount, and SavingAccount) with the function to String 0. 5 points for using the Keyword super in the classes Checking and Saving in order to access superclass members in the class Account. -5 points for meeting all requirements. 10 points for the test program ...... 2
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