I need help with using the transaction array to update the deposit and deductions in the array...I honestly don't have enough time to sit down and work on it..due tomorrow and would like some assistance. Its beginner programming i know, but havent brushed up on it since summer. Thanks. Here is my code so far. the blank methods and incorporating the array updates is what im having problems with
class Account {
private String firstName;
private String lastName;
private double balance;
private int accountNum;
private double amount;
//Create a transaction array of 10
int [] rgiTransaction = new int[10];
//Initial Account Info
public Account(){
firstName = "Quintin";
lastName = "Jenko";
balance = 0.0;
accountNum = 123;
}
//Set Account Info
public Account(String _firstName, String _lastName, double _balance, int _accountNum){
firstName = _firstName;
lastName = _lastName;
balance = _balance;
accountNum = _accountNum;
}
//Updates balance after deposit and transactions
public double deposit(double depositamount){
balance = balance + depositamount;
return balance;
}
//Updates balance after deduction and transactions
public double deduction(double _deductionAmount){
balance = balance - _deductionAmount;
return balance;
}
public void printLastFiveTransactions(){
}
public void printLastFiveDeposits(){
}
public void printLastFiveDeductions(){
}
//Print Account Info
public void printAccountInfo(){
System.out.println("First Name: " + firstName);
System.out.println("Last Name: " + lastName);
System.out.println("Account Number: " + accountNum);
System.out.println("Balance: " + balance);
}
}