Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help getting the correct output for my code. I already have the code written and in working order, I just can't get the

I need help getting the correct output for my code. I already have the code written and in working order, I just can't get the decimal format to work. I will give you a good rating if you can figure out and get the formatting correct. I will post my 5 .java files below and the input/output that is expected. Like I said they already work so I just need to figure out the decimal issue. Don't worry about spacing, I just need to get the decimals in order!

ASSIGNMENT5.JAVA

//to use InputStreamReader and BufferedReader

import java.io.BufferedReader;

import java.io.IOException;

import java.io.InputStreamReader;

//to use ArrayList

import java.util.ArrayList;

public class Assignment5 {

public static void main(String[] args) {

// ArrayList object is used to store account objects

ArrayList accountList = new ArrayList<>();

try {

printMenu(); // print out menu

// create a BufferedReader object to read input from a keyboard

InputStreamReader isr = new InputStreamReader(System.in);

BufferedReader stdin = new BufferedReader(isr);

String line, inputInfo;

boolean operation = false;

char input1;

do {

System.out.println("What action would you like to perform?");

line = stdin.readLine().trim();

input1 = line.charAt(0);

input1 = Character.toUpperCase(input1);

if (line.length() == 1) {

switch (input1) {

case 'A': // Add BankAccount

System.out.print("Please enter some account information to add: ");

inputInfo = stdin.readLine().trim();

accountList.add(BankAccountParser.parseStringToBankAccount(inputInfo));

break;

case 'C': // Make Credit

System.out.print("Account number to make credit: ");

String accountNumber = stdin.readLine().trim();

System.out.print("Amount (in pennies) to make credit: ");

int amount = Integer.parseInt(stdin.readLine().trim());

for (BankAccount account : accountList) {

if (account.getAccountNumber().equals(accountNumber)) {

account.credit(amount);

operation = true;

break;

}

}

if (operation)

System.out.print("credit performed ");

else

System.out.print("credit not performed ");

break;

case 'D': // Make Debit

System.out.print("Account number to make debit: ");

String accountNumber2 = stdin.readLine().trim();

System.out.print("Amount (in pennies) to make debit: ");

int amount2 = Integer.parseInt(stdin.readLine().trim());

for (BankAccount account : accountList) {

if (account.getAccountNumber().equals(accountNumber2)) {

account.debit(amount2);

operation = true;

break;

}

}

if (operation)

System.out.print("debit performed ");

else

System.out.print("debit not performed ");

break;

case 'I': // Apply Monthly Interest

for (BankAccount account : accountList) {

account.applyInterest();

}

System.out.print("monthly interest applied ");

break;

case 'L': // List BankAccounts

if (!accountList.isEmpty() ) {

for (BankAccount account : accountList) {

System.out.println(account.toString());

}

}

else{

System.out.println("no accounts ");

}

break;

case 'Q': // Quit

break;

case 'T': // Transfer Fund

System.out.print("Account number to transfer funds FROM - ");

String fromAccountNumber = stdin.readLine().trim();

System.out.print("Account number to transfer funds TO - ");

String toAccountNumber = stdin.readLine().trim();

System.out.print("Amount (in pennies) to transfer: ");

int amount3 = Integer.parseInt(stdin.readLine().trim());

BankAccount fromAccount = null, toAccount = null;

for(BankAccount account: accountList) {

if(account.getAccountNumber().equals(fromAccountNumber)){

fromAccount = account;

}

if(account.getAccountNumber().equals(toAccountNumber)){

toAccount = account;

}

}

if (toAccount != null && fromAccount != null && fromAccount.getBalanceInPennies() >= amount3) {

fromAccount.debit(amount3);

toAccount.credit(amount3);

System.out.print("transfer performed ");

} else

System.out.println("*** transfer failed - Invalid account number or insufficient funds!");

break;

case '?': // Display Menu

printMenu();

break;

default:

System.out.print("Unknown action ");

break;

}

} else {

System.out.print("Unknown action ");

}

} while (input1 != 'Q'); // stop the loop when Q is read

} catch (IOException exception) {

System.out.println("IO Exception");

}

}

/** The method printMenu displays the menu to a use **/

public static void printMenu() {

System.out.print("Choice\t\tAction " + "------\t\t------ " + "A\t\tAdd BankAccount " + "C\t\tMake Credit "

+ "D\t\tMake Debit " + "I\t\tApply Monthly Interest " + "L\t\tList BankAccounts " + "Q\t\tQuit "

+ "T\t\tTransfer Fund " + "?\t\tDisplay Help ");

}

}

BankAccountParser.java

/**

* This is factory class used to instantiate the BankAccount object based on its

* type

*/

public class BankAccountParser {

/**

* Parses the string to bank account.

*

* @param inputInfo

* the input info

* @return the bank account

*/

public static BankAccount parseStringToBankAccount(String inputInfo) {

BankAccount bankAccount = null;

String[] inputs = inputInfo.split("/");

String type = inputs[0];

String accountNumber = inputs[1];

double interestRate = Double.parseDouble(inputs[2]);

int balanceInPennies = Integer.parseInt(inputs[3]);

if (type.equals("SA")) {

return new SavingsAccount(balanceInPennies, interestRate, accountNumber);

}

if (type.equals("CH")) {

int overdraftFeeInPennies = Integer.parseInt(inputs[4]);

return new CheckingAccount(balanceInPennies, interestRate, accountNumber, overdraftFeeInPennies);

}

if (type.equals("CR")) {

int creditcardLimit = Integer.parseInt(inputs[4]);

return new CreditcardAccount(balanceInPennies, interestRate, accountNumber, creditcardLimit);

}

return bankAccount;

}

}

BankAccount.Java

import java.text.DecimalFormat; /**

* The Class BankAccount contains the basic attribute which bank requires.

*/

public abstract class BankAccount {

/** The balance in pennies. */

protected int balanceInPennies;

/** The interest rate. */

protected double interestRate;

/** The account number. */

protected String accountNumber;

/**

* Debit.

*

* @param amountINPennies the amount IN pennies

* @return true, if successful

*/

protected abstract boolean debit(int amountINPennies);

/**

* Apply interest.

*/

protected abstract void applyInterest();

/**

* Instantiates a new bank account.

*

* @param balanceInPennies the balance in pennies

* @param interestRate the interest rate

* @param accountNumber the account number

*/

public BankAccount(int balanceInPennies, double interestRate, String accountNumber) {

this.balanceInPennies = balanceInPennies;

this.interestRate = interestRate;

this.accountNumber = accountNumber;

}

/**

* Gets the balance in pennies.

*

* @return the balance in pennies

*/

public int getBalanceInPennies() {

return balanceInPennies;

}

/**

* Gets the interest rate.

*

* @return the interest rate

*/

public double getInterestRate() {

return interestRate;

}

/**

* Sets the interest rate.

*

* @param interestRate the new interest rate

*/

public void setInterestRate(double interestRate) {

this.interestRate = interestRate;

}

/**

* Gets the account number.

*

* @return the account number

*/

public String getAccountNumber() {

return accountNumber;

}

/**

* Sets the account number.

*

* @param accountNumber the new account number

*/

public void setAccountNumber(String accountNumber) {

this.accountNumber = accountNumber;

}

/**

* Credit.

*

* @param amountInPennies the amount in pennies

* @return true, if successful

*/

public boolean credit(int amountInPennies) {

if (amountInPennies > 0) {

this.balanceInPennies = amountInPennies; return true;

} else {

return false;

}

}

/* (non-Javadoc)

* @see java.lang.Object#toString()

*/

@Override

public String toString() {

StringBuilder builder = new StringBuilder();

DecimalFormat fmt = new DecimalFormat ("0.##");

builder.append(" Account ID:\t:\t");

builder.append(accountNumber);

builder.append(" Balance\t\t:\t");

builder.append(fmt.format(balanceInPennies));

builder.append(" Interest rate\t:\t");

builder.append(interestRate);

return builder.toString();

}

}

CreditcardAccount.java

/**

* This Class is used to perform checking account operation.

*/

public class CreditcardAccount extends BankAccount {

/** The credit limit pennies. */

private int creditLimitPennies;

/**

* Instantiates a new creditcard account.

*

* @param balanceInPennies

* the balance in pennies

* @param interestRate

* the interest rate

* @param accountNumber

* @param creditcardLimit

* the credit card limit

*/

public CreditcardAccount(int balanceInPennies, double interestRate, String accountNumber, int creditcardLimit) {

super(balanceInPennies, interestRate, accountNumber);

this.creditLimitPennies = creditcardLimit;

}

/*

* (non-Javadoc)

*

* @see bankaccount.BankAccount#debit(int)

*/

@Override

protected boolean debit(int amountINPennies) {

if (amountINPennies > creditLimitPennies) {

return false;

} else {

super.balanceInPennies -= amountINPennies;

return false;

}

}

/*

* (non-Javadoc)

*

* @see bankaccount.BankAccount#applyInterest()

*/

@Override

protected void applyInterest() {

if (super.balanceInPennies > 0) {

int interestAmount = (int) (super.balanceInPennies * super.interestRate);

super.balanceInPennies += interestAmount;

}

}

/*

* (non-Javadoc)

*

* @see bankaccount.BankAccount#toString()

*/

@Override

public String toString() {

String str = super.toString();

StringBuilder sb = new StringBuilder();

sb.append(" Account type\t:\tCreditcard");

sb.append(str);

sb.append(" Credit limit\t:\t");

sb.append(creditLimitPennies);

return sb.toString();

}

}

SavingsAccount.java

/**

* This Class is used to perform savings account operation.

*/

public class SavingsAccount extends BankAccount {

/**

* Instantiates a new savings account.

*

* @param balanceInPennies the balance in pennies

* @param interestRate the interest rate

* @param accountNumber the account number

*/

public SavingsAccount(int balanceInPennies, double interestRate, String accountNumber) {

super(balanceInPennies, interestRate, accountNumber );

}

/* (non-Javadoc)

* @see bankaccount.BankAccount#debit(int)

*/

@Override

protected boolean debit(int amountINPennies) {

if (amountINPennies > 0 && amountINPennies > super.balanceInPennies) {

return false;

} else {

super.balanceInPennies -= amountINPennies;

return false;

}

}

/* (non-Javadoc)

* @see bankaccount.BankAccount#applyInterest()

*/

@Override

protected void applyInterest() {

if (super.balanceInPennies != 0) {

int interestAmount = (int) (super.balanceInPennies * super.interestRate);

super.balanceInPennies += interestAmount;

}

}

/* (non-Javadoc)

* @see bankaccount.BankAccount#toString()

*/

@Override

public String toString() { String str = super.toString();

StringBuilder sb = new StringBuilder();

sb.append(" Account type\t:\tSavings");

sb.append(str);

return sb.toString();

}}

CheckingAccount.java

/**

* This Class is used to perform checking account operation.

*/

public class CheckingAccount extends BankAccount {

/** The overdraft fee pennies. */

private int overdraftFeePennies;

/**

* Instantiates a new checking account.

*

* @param balanceInPennies the balance in pennies

* @param interestRate the interest rate

* @param accountNumber the account number

* @param overdraftFeeInPennies the overdraft fee in pennies

*/

public CheckingAccount(int balanceInPennies, double interestRate, String accountNumber, int overdraftFeeInPennies) {

super(balanceInPennies, interestRate, accountNumber);

this.overdraftFeePennies = overdraftFeeInPennies;

}

/* (non-Javadoc)

* @see bankaccount.BankAccount#debit(int)

*/

@Override

public boolean debit(int amountINPennies) {

if (amountINPennies > 0) {

super.balanceInPennies -= overdraftFeePennies;

return false;

} else {

super.balanceInPennies -= amountINPennies;

return false;

}

}

/* (non-Javadoc)

* @see bankaccount.BankAccount#applyInterest()

*/

@Override

public void applyInterest() {

if (super.balanceInPennies > 0) {

int interestAmount = (int) (super.balanceInPennies * super.interestRate);

super.balanceInPennies += interestAmount;

}

}

/* (non-Javadoc)

* @see bankaccount.BankAccount#toString()

*/

@Override

public String toString() {

String str = super.toString();

StringBuilder sb = new StringBuilder();

sb.append(" Account type\t:\tChecking ");

sb.append(str);

sb.append(" Overdraft fee\t:\t");

sb.append(overdraftFeePennies);

return sb.toString();

}

}

Here are the inputs

input 1

A SA/savings01/0.02/100000 L A CH/checking02/0.05/200000/2000 L A CR/credit333/0.2/-30000/100000 L Q 

Output 1

Choice Action ------ ------ A Add BankAccount C Make Credit D Make Debit I Apply Monthly Interest L List BankAccounts Q Quit T Transfer Fund ? Display Help What action would you like to perform? Please enter some account information to add: What action would you like to perform? Account type : Savings Account ID : savings01 Balance : 1000.00 Interest rate : 0.02 What action would you like to perform? Please enter some account information to add: What action would you like to perform? Account type : Savings Account ID : savings01 Balance : 1000.00 Interest rate : 0.02 Account type : Checking Account ID : checking02 Balance : 2000.00 Interest rate : 0.05 Overdraft fee : 20.00 What action would you like to perform? Please enter some account information to add: What action would you like to perform? Account type : Savings Account ID : savings01 Balance : 1000.00 Interest rate : 0.02 Account type : Checking Account ID : checking02 Balance : 2000.00 Interest rate : 0.05 Overdraft fee : 20.00 Account type : Creditcard Account ID : credit333 Balance : -300.00 Interest rate : 0.20 Credit limit : 1000.00 What action would you like to perform? 

Input 2

A CH/bank2311/0.03/450025/3050 A CR/credit100/0.15/-200/50000 A SA/creditunion35/0.05/460050 L C creditunion35 15000 L C credit100 10000 L C credit200 20000 L D bank2311 10000 L D credit100 50000 L D bank4194 10000 L D bank2311 500000 L D credit100 49999 L Q 
Output 2 Choice Action ------ ------ A Add BankAccount C Make Credit D Make Debit I Apply Monthly Interest L List BankAccounts Q Quit T Transfer Fund ? Display Help What action would you like to perform? Please enter some account information to add: What action would you like to perform? Please enter some account information to add: What action would you like to perform? Please enter some account information to add: What action would you like to perform? Account type : Checking Account ID : bank2311 Balance : 4500.25 Interest rate : 0.03 Overdraft fee : 30.50 Account type : Creditcard Account ID : credit100 Balance : -2.00 Interest rate : 0.15 Credit limit : 500.00 Account type : Savings Account ID : creditunion35 Balance : 4600.50 Interest rate : 0.05 What action would you like to perform? Account number to make credit: Amount (in pennies) to make credit: credit performed What action would you like to perform? Account type : Checking Account ID : bank2311 Balance : 4500.25 Interest rate : 0.03 Overdraft fee : 30.50 Account type : Creditcard Account ID : credit100 Balance : -2.00 Interest rate : 0.15 Credit limit : 500.00 Account type : Savings Account ID : creditunion35 Balance : 4750.50 Interest rate : 0.05 What action would you like to perform? Account number to make credit: Amount (in pennies) to make credit: credit performed What action would you like to perform? Account type : Checking Account ID : bank2311 Balance : 4500.25 Interest rate : 0.03 Overdraft fee : 30.50 Account type : Creditcard Account ID : credit100 Balance : 98.00 Interest rate : 0.15 Credit limit : 500.00 Account type : Savings Account ID : creditunion35 Balance : 4750.50 Interest rate : 0.05 What action would you like to perform? Account number to make credit: Amount (in pennies) to make credit: credit not performed What action would you like to perform? Account type : Checking Account ID : bank2311 Balance : 4500.25 Interest rate : 0.03 Overdraft fee : 30.50 Account type : Creditcard Account ID : credit100 Balance : 98.00 Interest rate : 0.15 Credit limit : 500.00 Account type : Savings Account ID : creditunion35 Balance : 4750.50 Interest rate : 0.05 What action would you like to perform? Account number to make debit: Amount (in pennies) to make debit: debit performed What action would you like to perform? Account type : Checking Account ID : bank2311 Balance : 4400.25 Interest rate : 0.03 Overdraft fee : 30.50 Account type : Creditcard Account ID : credit100 Balance : 98.00 Interest rate : 0.15 Credit limit : 500.00 Account type : Savings Account ID : creditunion35 Balance : 4750.50 Interest rate : 0.05 What action would you like to perform? Account number to make debit: Amount (in pennies) to make debit: debit performed What action would you like to perform? Account type : Checking Account ID : bank2311 Balance : 4400.25 Interest rate : 0.03 Overdraft fee : 30.50 Account type : Creditcard Account ID : credit100 Balance : -402.00 Interest rate : 0.15 Credit limit : 500.00 Account type : Savings Account ID : creditunion35 Balance : 4750.50 Interest rate : 0.05 What action would you like to perform? Account number to make debit: Amount (in pennies) to make debit: debit not performed What action would you like to perform? Account type : Checking Account ID : bank2311 Balance : 4400.25 Interest rate : 0.03 Overdraft fee : 30.50 Account type : Creditcard Account ID : credit100 Balance : -402.00 Interest rate : 0.15 Credit limit : 500.00 Account type : Savings Account ID : creditunion35 Balance : 4750.50 Interest rate : 0.05 What action would you like to perform? Account number to make debit: Amount (in pennies) to make debit: debit not performed What action would you like to perform? Account type : Checking Account ID : bank2311 Balance : -630.25 Interest rate : 0.03 Overdraft fee : 30.50 Account type : Creditcard Account ID : credit100 Balance : -402.00 Interest rate : 0.15 Credit limit : 500.00 Account type : Savings Account ID : creditunion35 Balance : 4750.50 Interest rate : 0.05 What action would you like to perform? Account number to make debit: Amount (in pennies) to make debit: debit not performed What action would you like to perform? Account type : Checking Account ID : bank2311 Balance : -630.25 Interest rate : 0.03 Overdraft fee : 30.50 Account type : Creditcard Account ID : credit100 Balance : -402.00 Interest rate : 0.15 Credit limit : 500.00 Account type : Savings Account ID : creditunion35 Balance : 4750.50 Interest rate : 0.05 What action would you like to perform? 

Input 3

A CH/checking45/0.04/320040/2500 L A SA/account200/0.01/502036 L A CH/check5012/0.03/604535/2100 L T check5012 account200 200 L T account201 checking45 20 L T checking45 check5012 400000 L I L A CR/credit143/0.2/-10000/50000 A CR/credit423/0.2/10000/40000 A CH/check5203/0.02/-20000/3000 L I L ? Q 
Output 3 Choice Action ------ ------ A Add BankAccount C Make Credit D Make Debit I Apply Monthly Interest L List BankAccounts Q Quit T Transfer Fund ? Display Help What action would you like to perform? Please enter some account information to add: What action would you like to perform? Account type : Checking Account ID : checking45 Balance : 3200.40 Interest rate : 0.04 Overdraft fee : 25.00 What action would you like to perform? Please enter some account information to add: What action would you like to perform? Account type : Checking Account ID : checking45 Balance : 3200.40 Interest rate : 0.04 Overdraft fee : 25.00 Account type : Savings Account ID : account200 Balance : 5020.36 Interest rate : 0.01 What action would you like to perform? Please enter some account information to add: What action would you like to perform? Account type : Checking Account ID : checking45 Balance : 3200.40 Interest rate : 0.04 Overdraft fee : 25.00 Account type : Savings Account ID : account200 Balance : 5020.36 Interest rate : 0.01 Account type : Checking Account ID : check5012 Balance : 6045.35 Interest rate : 0.03 Overdraft fee : 21.00 What action would you like to perform? Account number to transfer funds FROM - Account number to transfer funds TO - Amount (in pennies) to transfer: transfer performed What action would you like to perform? Account type : Checking Account ID : checking45 Balance : 3200.40 Interest rate : 0.04 Overdraft fee : 25.00 Account type : Savings Account ID : account200 Balance : 5022.36 Interest rate : 0.01 Account type : Checking Account ID : check5012 Balance : 6043.35 Interest rate : 0.03 Overdraft fee : 21.00 What action would you like to perform? Account number to transfer funds FROM - Account number to transfer funds TO - Amount (in pennies) to transfer: *** transfer failed - Invalid account number or insufficient funds! What action would you like to perform? Account type : Checking Account ID : checking45 Balance : 3200.40 Interest rate : 0.04 Overdraft fee : 25.00 Account type : Savings Account ID : account200 Balance : 5022.36 Interest rate : 0.01 Account type : Checking Account ID : check5012 Balance : 6043.35 Interest rate : 0.03 Overdraft fee : 21.00 What action would you like to perform? Account number to transfer funds FROM - Account number to transfer funds TO - Amount (in pennies) to transfer: *** transfer failed - Invalid account number or insufficient funds! What action would you like to perform? Account type : Checking Account ID : checking45 Balance : 3200.40 Interest rate : 0.04 Overdraft fee : 25.00 Account type : Savings Account ID : account200 Balance : 5022.36 Interest rate : 0.01 Account type : Checking Account ID : check5012 Balance : 6043.35 Interest rate : 0.03 Overdraft fee : 21.00 What action would you like to perform? monthly interest applied What action would you like to perform? Account type : Checking Account ID : checking45 Balance : 3328.41 Interest rate : 0.04 Overdraft fee : 25.00 Account type : Savings Account ID : account200 Balance : 5072.58 Interest rate : 0.01 Account type : Checking Account ID : check5012 Balance : 6224.65 Interest rate : 0.03 Overdraft fee : 21.00 What action would you like to perform? Please enter some account information to add: What action would you like to perform? Please enter some account information to add: What action would you like to perform? Please enter some account information to add: What action would you like to perform? Account type : Checking Account ID : checking45 Balance : 3328.41 Interest rate : 0.04 Overdraft fee : 25.00 Account type : Savings Account ID : account200 Balance : 5072.58 Interest rate : 0.01 Account type : Checking Account ID : check5012 Balance : 6224.65 Interest rate : 0.03 Overdraft fee : 21.00 Account type : Creditcard Account ID : credit143 Balance : -100.00 Interest rate : 0.20 Credit limit : 500.00 Account type : Creditcard Account ID : credit423 Balance : 100.00 Interest rate : 0.20 Credit limit : 400.00 Account type : Checking Account ID : check5203 Balance : -200.00 Interest rate : 0.02 Overdraft fee : 30.00 What action would you like to perform? monthly interest applied What action would you like to perform? Account type : Checking Account ID : checking45 Balance : 3461.54 Interest rate : 0.04 Overdraft fee : 25.00 Account type : Savings Account ID : account200 Balance : 5123.30 Interest rate : 0.01 Account type : Checking Account ID : check5012 Balance : 6411.38 Interest rate : 0.03 Overdraft fee : 21.00 Account type : Creditcard Account ID : credit143 Balance : -120.00 Interest rate : 0.20 Credit limit : 500.00 Account type : Creditcard Account ID : credit423 Balance : 100.00 Interest rate : 0.20 Credit limit : 400.00 Account type : Checking Account ID : check5203 Balance : -200.00 Interest rate : 0.02 Overdraft fee : 30.00 What action would you like to perform? Choice Action ------ ------ A Add BankAccount C Make Credit D Make Debit I Apply Monthly Interest L List BankAccounts Q Quit T Transfer Fund ? Display Help What action would you like to perform? 

Input 4

A CH/checking45/0.04/320040/2500 L A SA/account200/0.01/502036 L A CH/check5012/0.03/604535/2100 L A CR/credit143/0.2/-10000/60000 L C check5012 100000 L D account200 203000 L I L T check5012 account200 30000 L A SA/account301/0.02/250060 L I L Q 

Output 4

Choice Action ------ ------ A Add BankAccount C Make Credit D Make Debit I Apply Monthly Interest L List BankAccounts Q Quit T Transfer Fund ? Display Help What action would you like to perform? Please enter some account information to add: What action would you like to perform? Account type : Checking Account ID : checking45 Balance : 3200.40 Interest rate : 0.04 Overdraft fee : 25.00 What action would you like to perform? Please enter some account information to add: What action would you like to perform? Account type : Checking Account ID : checking45 Balance : 3200.40 Interest rate : 0.04 Overdraft fee : 25.00 Account type : Savings Account ID : account200 Balance : 5020.36 Interest rate : 0.01 What action would you like to perform? Please enter some account information to add: What action would you like to perform? Account type : Checking Account ID : checking45 Balance : 3200.40 Interest rate : 0.04 Overdraft fee : 25.00 Account type : Savings Account ID : account200 Balance : 5020.36 Interest rate : 0.01 Account type : Checking Account ID : check5012 Balance : 6045.35 Interest rate : 0.03 Overdraft fee : 21.00 What action would you like to perform? Please enter some account information to add: What action would you like to perform? Account type : Checking Account ID : checking45 Balance : 3200.40 Interest rate : 0.04 Overdraft fee : 25.00 Account type : Savings Account ID : account200 Balance : 5020.36 Interest rate : 0.01 Account type : Checking Account ID : check5012 Balance : 6045.35 Interest rate : 0.03 Overdraft fee : 21.00 Account type : Creditcard Account ID : credit143 Balance : -100.00 Interest rate : 0.20 Credit limit : 600.00 What action would you like to perform? Account number to make credit: Amount (in pennies) to make credit: credit performed What action would you like to perform? Account type : Checking Account ID : checking45 Balance : 3200.40 Interest rate : 0.04 Overdraft fee : 25.00 Account type : Savings Account ID : account200 Balance : 5020.36 Interest rate : 0.01 Account type : Checking Account ID : check5012 Balance : 7045.35 Interest rate : 0.03 Overdraft fee : 21.00 Account type : Creditcard Account ID : credit143 Balance : -100.00 Interest rate : 0.20 Credit limit : 600.00 What action would you like to perform? Account number to make debit: Amount (in pennies) to make debit: debit performed What action would you like to perform? Account type : Checking Account ID : checking45 Balance : 3200.40 Interest rate : 0.04 Overdraft fee : 25.00 Account type : Savings Account ID : account200 Balance : 2990.36 Interest rate : 0.01 Account type : Checking Account ID : check5012 Balance : 7045.35 Interest rate : 0.03 Overdraft fee : 21.00 Account type : Creditcard Account ID : credit143 Balance : -100.00 Interest rate : 0.20 Credit limit : 600.00 What action would you like to perform? monthly interest applied What action would you like to perform? Account type : Checking Account ID : checking45 Balance : 3328.41 Interest rate : 0.04 Overdraft fee : 25.00 Account type : Savings Account ID : account200 Balance : 3020.26 Interest rate : 0.01 Account type : Checking Account ID : check5012 Balance : 7256.71 Interest rate : 0.03 Overdraft fee : 21.00 Account type : Creditcard Account ID : credit143 Balance : -120.00 Interest rate : 0.20 Credit limit : 600.00 What action would you like to perform? Account number to transfer funds FROM - Account number to transfer funds TO - Amount (in pennies) to transfer: transfer performed What action would you like to perform? Account type : Checking Account ID : checking45 Balance : 3328.41 Interest rate : 0.04 Overdraft fee : 25.00 Account type : Savings Account ID : account200 Balance : 3320.26 Interest rate : 0.01 Account type : Checking Account ID : check5012 Balance : 6956.71 Interest rate : 0.03 Overdraft fee : 21.00 Account type : Creditcard Account ID : credit143 Balance : -120.00 Interest rate : 0.20 Credit limit : 600.00 What action would you like to perform? Please enter some account information to add: What action would you like to perform? Account type : Checking Account ID : checking45 Balance : 3328.41 Interest rate : 0.04 Overdraft fee : 25.00 Account type : Savings Account ID : account200 Balance : 3320.26 Interest rate : 0.01 Account type : Checking Account ID : check5012 Balance : 6956.71 Interest rate : 0.03 Overdraft fee : 21.00 Account type : Creditcard Account ID : credit143 Balance : -120.00 Interest rate : 0.20 Credit limit : 600.00 Account type : Savings Account ID : account301 Balance : 2500.60 Interest rate : 0.02 What action would you like to perform? monthly interest applied What action would you like to perform? Account type : Checking Account ID : checking45 Balance : 3461.54 Interest rate : 0.04 Overdraft fee : 25.00 Account type : Savings Account ID : account200 Balance : 3353.46 Interest rate : 0.01 Account type : Checking Account ID : check5012 Balance : 7165.41 Interest rate : 0.03 Overdraft fee : 21.00 Account type : Creditcard Account ID : credit143 Balance : -144.00 Interest rate : 0.20 Credit limit : 600.00 Account type : Savings Account ID : account301 Balance : 2550.61 Interest rate : 0.02 What action would you like to perform? 

This is a lot of text I know but it should not be that bad for someone who actually knows code. Thanks in advance!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is oversampling?

Answered: 1 week ago

Question

5. Identify the logical fallacies, deceptive forms of reasoning

Answered: 1 week ago

Question

6. Choose an appropriate organizational strategy for your speech

Answered: 1 week ago