Question: JAVA Hello, I am having some issues with my Bank Program code: Here are the instructions: And Here is my Code: Main.Java package Bank; public
JAVA
Hello, I am having some issues with my Bank Program code:
Here are the instructions:


![public class Main { public static void main(String[] args) { // TODO](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f463e5477b8_38866f463e494240.jpg)


And Here is my Code:
Main.Java
package Bank;
public class Main {
public static void main(String[] args) { // TODO code application logic here } }
Transaction.java
package Bank; import java.util.Date; import java.text.NumberFormat; import java.text.SimpleDateFormat;
public abstract class Transaction { private Date transactionDate; private String accountNum; private double transactionAmount; private double beginbal; private double endbal;
public Transaction(){}
public Transaction(Date d, String n, double a, double b, double e){ transactionDate = d; accountNum = n; transactionAmount = a; beginbal = b;
}
/** * @return the transactionDate */ public Date getTransactionDate() { return transactionDate; }
/** * @param transactionDate the transactionDate to set */ public void setTransactionDate(Date transactionDate) { this.transactionDate = transactionDate; }
/** * @return the accountNum */ public String getAccountNum() { return accountNum; }
/** * @param accountNum the accountNum to set */ public void setAccountNum(String accountNum) { this.accountNum = accountNum; }
/** * @return the transactionAmount */ public double getTransactionAmount() { return transactionAmount; }
/** * @param transactionAmount the transactionAmount to set */ public void setTransactionAmount(double transactionAmount) { this.transactionAmount = transactionAmount; }
/** * @return the beginbal */ public double getBeginbal() { return beginbal; }
/** * @param beginbal the beginbal to set */ public void setBeginbal(double beginbal) { this.beginbal = beginbal; } public abstract void calcBalance();
@Override public String toString() { SimpleDateFormat sdf = new SimpleDateFormat("MM/DD/yyyy"); }
}//end class
Deposit.java
package Bank; import java.util.Date; import java.text.NumberFormat; public class Deposit extends Transaction { public Deposit(){} public Deposit (Date d, String a, double b, double e){ super(d,a,b,e); calcBalance(); } }//end class
Withdrawal.java
package Bank; import java.util.Date; import java.text.NumberFormat; public class Withdrawal extends Transaction{
public Withdrawal(){} public Withdrawal(Date d, String a, double b, double e){ super(d,a,b,e); calcBalance(); }
}//end class
Thank you for you time
MIS276 HW3: Inheritance Bank Program 20 Points Your Task In this program you will demonstrate the use of inheritance by coding an abstract superclass and two subclasses. Here is a UML snapshot Date transactiondate String accountNum S- Deposit -double keginBal -doubla ero al Depes +Depesh Date sTing cct, coubic begin, coubic ant Transacieno @t Transacinoate e, string acet doubl+aagin doubl. u+Data Wrdrawd double +Suing Suingo Code the following three classes: Transaction (abstract superclass), Deposit (subclass, extends Transaction), and Withdrawal (subclass, extends Transaction). See next page for detailed specs Follow the specs closely as you go
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
