This site requires JavaScript, please enable it in your browser!
Greenfoot back
divinity
divinity wrote ...

2016/12/14

increasing instead of decreasing what is the cause, plz help

1
2
3
divinity divinity

2016/12/14

#
hi danpost and super_Hippo I know this would sound kinda weird, but this is my second assignment. it supposed toe same way as assignment. I know you have seen it before but bear with me. I have to hand this up on Sunday 18 December. so I am looking for all the help i can get before so it can be fixed. I would like to know what is the cause for it to be increasing the amount instead of decreasing. what is it in my calculation or method that is causing that error. as I checked for the balance it says 50 but when i make a withdrawal, it says a higher number which is wrong, it supposed to say 25. with every withdrawal it goes up instead of down. here is the codes and the output. can you guys explain what is happening
package Project;

import java.text.DecimalFormat;
import java.util.Scanner;



public class ATM {
    
    DecimalFormat df = new DecimalFormat("#.00");
        
        //this account hold 10 account
        Account[] acct = new Account[10];
     
        public static void main(String[] args) {
           
            //create account method 
            new ATM().createAccount();
    }
        public void createAccount()
        {
            Scanner input = new Scanner(System.in);
            int i = 0; 
            final double bal = 50.0;
            
            //creating a new person
            Person[] p = new Person[i++];
            
            //acquiring the user information
            for(i=0; i<acct.length; i++){
                
                System.out.println("Enter your first name");
                String fn = input.next();
                
                System.out.println("Enter your address");
                String a = input.next(); 
                
                System.out.println("Enter your contact");
                String c = input.next();            
                
                System.out.println("Enter the client number");
                int cn = input.nextInt(); 
                                
                //creating a new client each time the program runs
                Clients client = new Clients(fn,  a, c, cn);
                
                
                //asking the user to enter the type of account they want to utilize
                System.out.println("Welcome to the Account Type:\n  ");
                System.out.println("Please select from the following menu:\n");
                System.out.println("===================================");
                System.out.println("| Please select your account type |");
                System.out.println("===================================");
                System.out.println("| [\n1] Savings Account           |");
                System.out.println("| [\n2] Checking Account          |");
                System.out.println("| [\n3] CreditCard Account        |");
                System.out.println("===================================");      
                int acctType = input.nextInt();
               
                if(acctType == 1)
                {
                    acct[i] = new SavingsAccount(i, bal, client);
                }
                else if(acctType == 2)
                {
                    acct[i] = new CheckingAccount(i, bal, client);
                }
                else if(acctType == 3)
                {
                    acct[i] = new CreditCardAccount(i, bal, client);
                }
            }
            while(true)
            {
                System.out.println("Enter your account id");
                int id = input.nextInt();
                     
                    //this will let user break out of the loop to end the program
                      if(id == -1)
                      {
                          break;
                      }
                //this loop indicate that the id should be between 1 - 9
                while(id < 0 || id > 9)
                {
                    //indicating to the user that the id enter is wrong and to try again
                    System.out.println("ID is incorect, try again");
                    id = input.nextInt();
                }
                while(true)
                {
                    showMenu();
                    
                    if(!useMenu(acct[id],input))
                    {
                        System.out.println();
                        break;
                    }
                    System.out.println("\n");
                }
            }
        }
        public boolean useMenu(Account acct, Scanner input)
        {
            int userchoice = input.nextInt();
            
            //everytime it runs it shall be false until it is true
            double amt;
            if(userchoice == 5)
            {
                return false;
            }
            else if(userchoice == 1)
            {
                //user checking their balances
                System.out.println("The account balance is: "+ acct.getbalance());
                return true;
            }
            else if(userchoice == 2)
            {
                //asking the user what amount to be withdrawn
                System.out.println("Enter the amount to withdraw");
                amt =input.nextDouble();//hold the amt to be withdrawn
                if(amt > acct.getbalance())//indicating if the amt withdrawn is over the limit
                {
                    //indicating that there is not enough funds in the account
                    System.out.println("Insufficient funds " + "Balance is "+acct.getbalance());
                }
                else
                {
                    //letting the user know that thre is enough in the account
                    acct.withdraw(amt);
                    //balance is printed out after transaction
                    System.out.println("Balance is: "+ acct.getbalance());
                }
            }
            else if(userchoice == 3)
            {
                //user is asked to enter the amount to be deposited
                System.out.println("Enter the amount to deposit");
                acct.deposit(input.nextDouble());//hold the amt deposited
                System.out.println("Balance is "+ acct.getbalance());//gathering the balance after the  transactions
                return true;
            }
            else if(userchoice == 4)
            {
                //gathering the user information 
                System.out.println(acct.getClient().toString());
            }
            else
            {
                //this indicated that the user enter a choice that is not there.
                System.out.println("invalid choice");
            }
            return true;
        }
        
        public static void showMenu()
        {
            //displaying the menu where the user has to choose from
            System.out.println("Welcome to the Automated Teller Machine!\n");
            System.out.println("Select from the following menu options below:\n");
            System.out.println("===================================");
            System.out.println("|         Main Menu               |");
            System.out.println("===================================");
            System.out.println("| [1] Check Balance               |");
            System.out.println("| [2] Withdraw                    |");
            System.out.println("| [3] Deposit                     |");
            System.out.println("| [4] Display owner's Details     |");
            System.out.println("| [5] Exist                       |");
            System.out.println("Please select your choice now!!   |");
            System.out.println("====================================");
        }

}

this is the output

   Main Menu               |
===================================
| [1] Check Balance               |
| [2] Withdraw                    |
| [3] Deposit                     |
| [4] Display owner's Details     |
| [5] Exist                       |
Please select your choice now!!   |
====================================
1
The account balance is: 50.0


Welcome to the Automated Teller Machine!

Select from the following menu options below:

===================================
|         Main Menu               |
===================================
| [1] Check Balance               |
| [2] Withdraw                    |
| [3] Deposit                     |
| [4] Display owner's Details     |
| [5] Exist                       |
Please select your choice now!!   |
====================================
2
Enter the amount to withdraw
30
Balance is: 16.775


Welcome to the Automated Teller Machine!

Select from the following menu options below:

===================================
|         Main Menu               |
===================================
| [1] Check Balance               |
| [2] Withdraw                    |
| [3] Deposit                     |
| [4] Display owner's Details     |
| [5] Exist                       |
Please select your choice now!!   |
====================================
4

 name wilma
address carenage
contact 4410020
Person null
Client Number 489


Welcome to the Automated Teller Machine!

Select from the following menu options below:

===================================
|         Main Menu               |
===================================
| [1] Check Balance               |
| [2] Withdraw                    |
| [3] Deposit                     |
| [4] Display owner's Details     |
| [5] Exist                       |
Please select your choice now!!   |
====================================
5

Enter your account id
-1
BUILD SUCCESSFUL (total time: 6 minutes 5 seconds)
danpost danpost

2016/12/14

#
We will need to see the current codes for the Account class.
divinity divinity

2016/12/14

#
here is the codes for the account class
package ATMMachine;


public abstract class Account {
    //instantiate the variable
    private int id;
    private double balance;
    private Clients client;
    private double acctTransaction;
    
    //constructor with parameter, this initialiing the id, bal and client number
    public Account(int i, double b, Clients c)
    {
        id = i;
        balance = b;
        client = c;
        acctTransaction=0;
    }
    // getting clients
    public Clients getClient()
    {
        return client;
    }
    // getting accid
    public int getid()
    {
        return id;
    }
    // getting balance
    public double getbalance()
    {
        return balance;
    }
    //setting clients
    public void setClients(Clients client)
    {
        this.client = client;
    }
    //setting accid
    public void setid(int id)
    {
        this.id = id;
    }
    // setting balance
    public void setbalance(double balance)
    {
        this.balance = balance;
    }
    public void setacctBalance(double balance){
        this.balance = balance;
    }
    public abstract void withdraw(double amt);
    
    public abstract void deposit(double amt);
    
    @Override // gathering user information
    public String toString(){
        String getdetails = "acct ID "+id+"balance "+balance+
                " Client "+client.toString();
        return getdetails;
    }
    public void reviseTransaction(){
        acctTransaction++;
    }
    public double getacctTransaction(){
        return acctTransaction;
    }
}
danpost danpost

2016/12/14

#
Okay -- we will need to see the 'withdraw' method in the type of account that Wilma had when you ran the program that produced the output above.
divinity divinity

2016/12/14

#
I rerun the program again and use different names so it is hard for me to find that name again
danpost danpost

2016/12/14

#
divinity wrote...
I rerun the program again and use different names so it is hard for me to find that name again
Well, then show the 'withdraw' method of all Account subclasses.
divinity divinity

2016/12/14

#
This is the checkingAccount
package ATMMachine;

public class CheckingAccount extends Account {
    //intantiate variable
    
    private final double withdraw;
    

    //constructor with parameter
    public CheckingAccount(int i, double b, Clients c) {
        super(i, b, c);//refering to the variable in the parents class
        withdraw = 0.3167;
    }
    
    
    @Override
    public void deposit(double amt){
        super.setbalance(super.getbalance() + amt);
    }
    

    @Override
    public void withdraw(double amt) {
        reviseTransaction();// transaction is being updated
        if (0.3167 * amt < super.getbalance()) {//super calling the getbalance
            super.setacctBalance(super.getbalance() - 0.3167 * amt);
            if(super.getacctTransaction() > 10)
            applyFixedFee();
        }
    }
    //applying the fee 
    public void applyFixedFee() {
        double Tempbalance = super.getbalance() - 0.3167;
        super.setbalance(Tempbalance);

    }

    @Override
    //gathering the information needed
    public String toString() {
        return super.toString()
                + " -> CheckingAccount:\n\t"
                + "acct balance "
                + super.getbalance()
                + " num of account transaction "
                + super.getbalance();
    }

This is the creditcard account
package ATMMachine;


public class CreditCardAccount extends Account {
    private final double withdrawTax;
        
        public CreditCardAccount(int i, double b, Clients c) 
        {
            super(i, b, c);
            withdrawTax = 0.1075;
        }
        
        public double getwithdrawTax(){
             return withdrawTax;
         }
        @Override
        public void deposit( double amt){
            super.setbalance(super.getbalance() + amt);
        }
        @Override
        public void withdraw(double amt){
            reviseTransaction();
            super.setbalance(super.getbalance() - amt);
            if(0.1075 * amt < super.getbalance()){
                super.setacctBalance(super.getbalance() - 0.1075 * amt);
                if(super.getacctTransaction() > 10)
                    applyFixedFee();
            }
            
        }
        public void applyFixedFee(){
            double TempBalance = super.getbalance()- 0.1075;
            super.setbalance(TempBalance);
        }
    @Override
        public String toString(){
            return super.toString()+
                    "\n CreditCardAccount "+
                    "Account Balance "+
                    super.getbalance();
        }
}
this is the savingsAccount class
package ATMMachine;

public class SavingsAccount extends Account {
  
    //constructor with parameters
    public SavingsAccount(int i, double b, Clients c) {
        super(i, b, c);//this is refering the variables in the parent class
    }
    
    
    @Override
    public void deposit(double amt) {
        super.setbalance(super.getbalance() + amt);
    }

    @Override
    //get the withdra method
    public void withdraw(double amt) {
        reviseTransaction();
        if (amt < super.getbalance()) {// calling the balance method 
            super.setacctBalance(super.getbalance() - amt);//calculating the balance from the amt
        }
    }
    @Override
    //gathering the account information
    public String toString() {
        return super.toString()+
                "-> Saving Account "+
                "account balance "+
                super.getbalance();

    }
}
danpost danpost

2016/12/14

#
Apparently Wilma has a credit card account and a withdraw of 30 adds a penalty of 0.1075 times the amount withdrawn. From 50, subtracting the 30 makes 20 and subtracting 30*0.1075 ( = 3.225 ) makes 16.775; precisely what the output shows. The balance is moving the correct direction. It may appear strange, but with a credit card account, the balance is usually allowed to go negative (when a purchase or withdraw is made). Then, a payment would be a deposit, bringing that negative value back toward zero. What your credit card account needs is a limit to how much can be borrowed (how far negative the balance is allowed to go).
divinity divinity

2016/12/14

#
hi danpost thanks sooooo much got it to work, I went and check all the other class where i had and I remove it and it work. thanks very much. again
divinity divinity

2016/12/17

#
hi danpost I have made some changes to the program and I am now getting back the same problem. the same increasing problem. can u look over the changes and tell me what is causing it to increase
package ATMMachine;

import java.text.DecimalFormat;
import java.util.Scanner;



public class ATM {
    
    DecimalFormat df = new DecimalFormat("#.00");
        
        //this account will hold the 10 account for the clients
        Account[] acct = new Account[10];
     
        public static void main(String[] args) {
           
            //create account 
            new ATM().createAccount();
    }
        public void createAccount()
        {
            Scanner input = new Scanner(System.in);
            int i = 0; 
            final double bal = 50.0;
            
            //creating a new person
            //Person[] p = new Person[i++];
            
            //acquiring the user information
            for(i = 0; i < acct.length; i++){
                
                System.out.println("Please enter your first name");
                String fn = input.next();
                
                System.out.println("Please enter your address");
                String a = input.next(); 
                
                System.out.println("Please enter your contact");
                String c = input.next();            
                
                System.out.println("Please enter the client number");
                int cn = input.nextInt(); 
                                
                //creating a new client each time the program runs
                Clients client = new Clients(fn,  a, c, cn);
                
               
                //asking the user to enter the type of account they want to utilize
                System.out.println("Welcome to the Account Type:\n  ");
                System.out.println("Please select from the following menu:\n");
                System.out.println("===================================");
                System.out.println("| Please select your account type |");
                System.out.println("===================================");
                System.out.println("| [\n1] Savings Account           |");
                System.out.println("| [\n2] Checking Account          |");
                System.out.println("| [\n3] CreditCard Account        |");
                System.out.println("===================================");      
                int acctType = input.nextInt();
               
                if(acctType == 1)
                {
                    acct[i] = new SavingsAccount(i, bal, client);
                    
                }
                else if(acctType == 2)
                {
                    acct[i] = new CheckingAccount(i, bal, client);
                    
                }
                else if(acctType == 3)
                {
                    acct[i] = new CreditCardAccount(i, bal, client);
                }
            }
            while(true)
            {
                //check ID codes determines if iD enter is the correct ID for the account number
                System.out.println("Please enter your account ID");
                int id = input.nextInt();
                     
                    //this will let user break out of the loop to end the program
                      if(id == -1)
                      {
                          break;
                      }
                //this loop indicate that the id should be between 1 - 9
                while(id < 0 || id > 9)
                {
                    //indicating to the user that the id enter is wrong and to try again
                    System.out.println("ID is invalid, try again");
                    id = input.nextInt();
                }
                while(true)
                {
                    displayMenu();
                    
                    if(!useMenu(acct[id],input))
                    {
                        System.out.println();
                        break;
                    }
                    System.out.println("\n");
                }
            }
        }
        public boolean useMenu(Account acct, Scanner input)
        {
            int userchoice = input.nextInt();
            
            //everytime it runs it shall be false until it is true
            double amt;
            if(userchoice == 5)
            {
                return false;
            }
            //user asked to enter their choice of transactions
            else if(userchoice == 1)
            {
                //user checking their balances
                System.out.println("The account balance is: "+ acct.getbalance());
                return true;
            }
            //user asked to enter their choice of transactions
            else if(userchoice == 2)
            {
                //asking the user what amount to be withdrawn
                System.out.println("Enter the amount to withdraw");
                amt =input.nextDouble();//hold the amt to be withdrawn
                
                if(amt > acct.getbalance())//indicating if the amt withdrawn is over the limit
                {
                    //indicating that there is not enough funds in the account
                    System.out.println("Insufficient funds " + "Balance is "+acct.getbalance());
                }
                else
                {
                    if (acct instanceof CheckingAccount){
                    
                        CheckingAccount ca = (CheckingAccount) acct;
                        ca.withdraw(amt);
                    }
                    else if (acct instanceof SavingsAccount){
                    
                        SavingsAccount sa = (SavingsAccount) acct;
                        sa.withdraw(amt);
                    }
                    else if (acct instanceof CreditCardAccount){
                    
                        CreditCardAccount cca = (CreditCardAccount) acct;
                        cca.withdraw(amt);
                    }
                    //acct.withdraw(amt);
                    //balance is printed out after transaction
                    //System.out.println("Balance is: "+ acct.getbalance());
                }
            }
            //user asked to enter their choice of transactions
            else if(userchoice == 3)
            {
                //user is asked to enter the amount to be deposited
                System.out.println("Enter the amount to deposit");
                acct.deposit(input.nextDouble());//hold the amt deposited
                System.out.println("Balance is "+ acct.getbalance());//gathering the balance after the  transactions
                return true;
            }
            //user asked to enter their choice of transactions
            else if(userchoice == 4)
            {
                //gathering the user information 
                System.out.println(acct.getClient().toString());
            }
            else
            {
                //this indicated that the user enter a choice that is not there.
                System.out.println("invalid choice");
            }
            return true;
        }
        
        public static void displayMenu()
        {
            //displaying the menu where the user has to choose from
            System.out.println("Welcome to the Automated Teller Machine!\n");
            System.out.println("Select from the following menu options below:\n");
            System.out.println("===================================");
            System.out.println("|         Main Menu               |");
            System.out.println("===================================");
            System.out.println("| [1] Check Balance               |");
            System.out.println("| [2] Withdraw                    |");
            System.out.println("| [3] Deposit                     |");
            System.out.println("| [4] Display owner's Details     |");
            System.out.println("| [5] Exist                       |");
            System.out.println("Please select your choice now!!   |");
            System.out.println("====================================");
        }

}

this is the output 
danpost danpost

2016/12/17

#
No output is shown and will need to see the class of the account type that you are having issues with.
divinity divinity

2016/12/18

#
hey danpost the problem fix, ah fix
divinity divinity

2016/12/20

#
hey danpost I thought I had it fix, one minute it running and giving me the correct output and the next back to the same increasing amount again. please help with this, here is the codes, the output. the main, the account class. any help is appreciated.
here is the main 
package ATMMachine;

import java.text.DecimalFormat;
import java.util.Scanner;



public class ATM {
    
    DecimalFormat df = new DecimalFormat("#.00");
        
        //this account will hold the 10 account for the clients
        Account[] acct = new Account[10];
     
        public static void main(String[] args) {
           
            //create account 
            new ATM().createAccount();
    }
        public void createAccount()
        {
            Scanner input = new Scanner(System.in);
            int i; 
            final double bal = 50.0;
            
            
            //acquiring the user information
            for(i = 0; i < acct.length; i++){
                
                System.out.println("Please enter your first name");
                String fn = input.next();
                
                System.out.println("Please enter your address");
                String a = input.next(); 
                
                System.out.println("Please enter your contact");
                String c = input.next();            
                
                System.out.println("Please enter the client number");
                int cn = input.nextInt(); 
                                
                //creating a new client each time the program runs
                Clients client = new Clients(fn,  a, c, cn);
                
                //asking the user to enter the type of account they want to utilize
                System.out.println("Welcome to the Account Type:\n  ");
                System.out.println("Please select from the following menu:\n");
                System.out.println("===================================");
                System.out.println("| Please select your account type |");
                System.out.println("===================================");
                System.out.println("| [\n1] Savings Account           |");
                System.out.println("| [\n2] Checking Account          |");
                System.out.println("| [\n3] CreditCard Account        |");
                System.out.println("===================================");      
                int acctType = input.nextInt();
               
                if(acctType == 1)
                {
                    acct[i] = new SavingsAccount(i, bal, client);
                    
                }
                else if(acctType == 2)
                {
                    acct[i] = new CheckingAccount(i, bal, client);
                    
                }
                else if(acctType == 3)
                {
                    acct[i] = new CreditCardAccount(i, bal, client);
                }
            }
            while(true)
            {
                //check ID codes determines if iD enter is the correct ID for the account number
                System.out.println("Please enter your account ID");
                int id = input.nextInt();
                     
                    //this will let user break out of the loop to end the program
                      if(id == -1)
                      {
                          break;
                      }
                //this loop indicate that the id should be between 1 - 9
                while(id < 0 || id > 9)
                {
                    //indicating to the user that the id enter is wrong and to try again
                    System.out.println("ID is invalid, try again");
                    id = input.nextInt();
                }
                while(true)
                {
                    displayMenu();
                    
                    if(!useMenu(acct[id],input))
                    {
                        System.out.println();
                        break;
                    }
                    System.out.println("\n");
                }
            }
        }
        public boolean useMenu(Account acct, Scanner input)
        {
            int userchoice = input.nextInt();
            
            //everytime it runs it shall be false until it is true
            double amt;
            if(userchoice == 5)
            {
                return false;
            }
            //user asked to enter their choice of transactions
            else if(userchoice == 1)
            {
                //user checking their balances
                System.out.println("The account balance is: "+ acct.getbalance());
                return true;
            }
            //user asked to enter their choice of transactions
            else if(userchoice == 2)
            {
                //asking the user what amount to be withdrawn
                System.out.println("Enter the amount to withdraw");
                amt =input.nextDouble();//hold the amt to be withdrawn
                
                if(amt > acct.getbalance())//indicating if the amt withdrawn is over the limit
                {
                    //indicating that there is not enough funds in the account
                    System.out.println("Insufficient funds " + "Balance is "+acct.getbalance());
                }
                else
                {
                    if (acct instanceof CheckingAccount){
                    
                        CheckingAccount ca = (CheckingAccount) acct;
                        ca.withdraw(amt);
                    }
                    else if (acct instanceof SavingsAccount){
                    
                        SavingsAccount sa = (SavingsAccount) acct;
                        sa.withdraw(amt);
                    }
                    else if (acct instanceof CreditCardAccount){
                    
                        CreditCardAccount cca = (CreditCardAccount) acct;
                        cca.withdraw(amt);
                    }
                    //balance is printed out after transaction
                    System.out.println("Balance is: "+ acct.getbalance());
                }
            }
            //user asked to enter their choice of transactions
            else if(userchoice == 3)
            {
                //user is asked to enter the amount to be deposited
                System.out.println("Enter the amount to deposit");
                acct.deposit(input.nextDouble());//hold the amt deposited
                System.out.println("Balance is "+ acct.getbalance());//gathering the balance after the  transactions
                return true;
            }
            //user asked to enter their choice of transactions
            else if(userchoice == 4)
            {
                //gathering the user information 
                System.out.println(acct.getClient().toString());
            }
            else
            {
                //this indicated that the user enter a choice that is not there.
                System.out.println("invalid choice");
            }
            return true;
        }
        
        public static void displayMenu()
        {
            //displaying the menu where the user has to choose from
            System.out.println("Welcome to the Automated Teller Machine!\n");
            System.out.println("Select from the following menu options below:\n");
            System.out.println("===================================");
            System.out.println("|         Main Menu               |");
            System.out.println("===================================");
            System.out.println("| [1] Check Balance               |");
            System.out.println("| [2] Withdraw                    |");
            System.out.println("| [3] Deposit                     |");
            System.out.println("| [4] Display owner's Details     |");
            System.out.println("| [5] Exist                       |");
            System.out.println("Please select your choice now!!   |");
            System.out.println("====================================");
        }

}
here is the Account class
package ATMMachine;


public abstract class Account {
    //instantiate the variable
    private int id;
    private double balance;
    private Clients client;
    private double acctTransaction;
    
    //constructor with parameter, this initialiing the id, bal and client number
    public Account(int i, double b, Clients c)
    {
        id = i;
        balance = b;
        client = c;
        acctTransaction=0;
    }
    // getting clients
    public Clients getClient()
    {
        return client;
    }
    // getting accid
    public int getid()
    {
        return id;
    }
    // getting balance
    public double getbalance()
    {
        return balance;
    }
    //setting clients
    public void setClients(Clients client)
    {
        this.client = client;
    }
    //setting accid
    public void setid(int id)
    {
        this.id = id;
    }
    // setting balance
    public void setbalance(double balance)
    {
        this.balance = balance;
    }
    public void setacctBalance(double balance){
        this.balance = balance;
    }
    public abstract void withdraw(double amt);
    
    public abstract void deposit(double amt);
    
    @Override // gathering user information
    public String toString(){
        String getdetails = "acct ID "+id+"balance "+balance+
                " Client "+client.toString();
        return getdetails;
    }
    public void reviseTransaction(){
        acctTransaction++;
    }
    public double getacctTransaction(){
        return acctTransaction;
    }
}

and here is the output
Please enter your account ID
7
Welcome to the Automated Teller Machine!

Select from the following menu options below:

===================================
|         Main Menu               |
===================================
| [1] Check Balance               |
| [2] Withdraw                    |
| [3] Deposit                     |
| [4] Display owner's Details     |
| [5] Exist                       |
Please select your choice now!!   |
====================================
1
The account balance is: 50.0


Welcome to the Automated Teller Machine!

Select from the following menu options below:

===================================
|         Main Menu               |
===================================
| [1] Check Balance               |
| [2] Withdraw                    |
| [3] Deposit                     |
| [4] Display owner's Details     |
| [5] Exist                       |
Please select your choice now!!   |
====================================
2
Enter the amount to withdraw
25
Balance is: 49.6833


Welcome to the Automated Teller Machine!

Select from the following menu options below:

===================================
|         Main Menu               |
===================================
| [1] Check Balance               |
| [2] Withdraw                    |
| [3] Deposit                     |
| [4] Display owner's Details     |
| [5] Exist                       |
Please select your choice now!!   |
====================================
3
Enter the amount to deposit
20
Balance is 69.6833


Welcome to the Automated Teller Machine!

Select from the following menu options below:

===================================
|         Main Menu               |
===================================
| [1] Check Balance               |
| [2] Withdraw                    |
| [3] Deposit                     |
| [4] Display owner's Details     |
| [5] Exist                       |
Please select your choice now!!   |
====================================
BUILD STOPPED (total time: 6 minutes 41 seconds)
danpost danpost

2016/12/20

#
Again, you are not showing all that is necessary to resolve the issue. You show the abstract Account class; but, the type of account "ID = 7" had was needed. What is the class code of that type of account?
divinity divinity

2016/12/20

#
hi danpost there is none actually, the program ask for 10 account, so I was just testing out to see if any number can work besides 3. do u want me to post the savingsaccount, checking account,creditcard and all of the othere class account.
There are more replies on the next page.
1
2
3