Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

As a follow up to Assignment #3, modify the CheckingAccount class again, to beco

ID: 3816010 • Letter: A

Question

As a follow up to Assignment #3, modify the CheckingAccount class again, to become a simple derived class of the parent class Account. The Account class contains the instance variables String name (the name of the person who owns the account) and double balance (the current balance of the account). There should be appropriate get methods in Account class to get the name and balance fields. The account name should appear in all reports and dialogue. The CheckingAccount class will still have the instance variables double totalServiceCharges, and Transaction [ ] transList (or ArrayListtransList). Also, create a Check class, a simple derived class of the Transaction class. The Check class will include the check number for each check transaction. The check number will be prompted for as the check is entered, and displayed in the checks listing. Also, create a Deposit class, a simple derived class of the Transaction class. The Deposit class will include the cash amount and check amount that total to the transaction amount. The cash and check amount for each deposit will be input in a new Deposit input screen. (See sample run below.) In this application’s design, you should have the following classes: 1. The Main class: This creates the frame, adds the panel, and sets it visible. This program is event-driven. You cannot put all the processing steps/logic in main method. However, you can put them in helper methods in the Main class. 2. The CheckOptionsPanel class: This creates the GUI components, adds listeners, and adds to the Panel. This is the class where most of the action (driven by events) takes place. You might want to put the processing methods (to be called by the listeners) in this class, along with the declaration of the CheckingAccount instance that you are processing. 3. The CheckingAccount class: This defines the CheckingAccount object. (Please keep this class methods simple. This is the file cabinet object which will be written to a file in a later assignment.) 4. The Account class: This serves as a Parent to the CheckingAccount class. 5. The Transaction class: This defines the transactions stored in the array inside the CheckingAccount objects. It is the parent of the Check class. 6. The Check class: This defines the check number and get method for processing the check number for each check transaction. 7. The Deposit class: This defines the cash and check amounts that comprise the total deposit transaction amount.

Explanation / Answer

If you provide Assignment #3 also, it would be good enough to understand this question very well.

I tried at my max to understand this question well. Thankyou. If any extra work need to be done, then please don't hesitate to comment. Always happy to help. Thankyou

Account.java

class Account
{
   private String name;
   private double balance;
  
   public String getName()
   {
       return this.name;
   }
   public double getBalance()
   {
       return this.balance;
   }
   public String toString()
   {
       return "The owner of this Account is "+this.name;
   }
}

CheckingAccount.java

import java.util.*;
class CheckingAccount extends Account
{
   private double totalServiceCharges;
   private ArrayList<Transaction> transList;
}


Transaction.java

class Transaction
{
   //you mention nothing about this class
}

Check.java

class Check extends Transaction
{
   private int checkNumber;
  
   public int getCheckNumber(){
       return this.checkNumber;
   }
}


Deposit.java

class Deposit extends Transaction
{
   private double cashAmount;
   private double checkAmount;
   private double transactionAmount;
  
   public double getTransactionAmount()
   {
       this.transactionAmount = this.cashAmount+this.checkAmount;
       return this.transactionAmount;
   }
}


Main.java

import java.awt.*;
import java.awt.event.*;
class Main
{
   public static void main(String a[])
   {
       Frame frame = new Frame("Title");
       frame.setSize(400,400);
       Panel checkOptionsPanel = new Panel(new FlowLayout());
       frame.add(checkOptionsPanel);
       CheckOptionsPanel panelListener = new CheckOptionsPanel();
       Button button = new Button("Create CheckingAccount instance");
       checkOptionsPanel.add(button);
       button.addActionListener(panelListener);
      
       frame.setVisible(true);
       frame.addWindowListener(new WindowAdapter()
       {
           public void windowClosing(WindowEvent we)
           {
               System.exit(0);
           }
       });
   }
   public Main()
   {
      
   }
}

CheckOptionsPanel.java

import java.awt.event.*;
class CheckOptionsPanel implements ActionListener
{
  
   public void actionPerformed(ActionEvent ae)
   {
       CheckingAccount ca = new CheckingAccount();
       System.out.println("CheckingAccount instance has been created!!! don't know what to do!!! please explain well, if this is not your need");
   }
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote