Results 1 to 5 of 5
  1. #1
    Taher is offline Member
    Join Date
    Aug 2010
    Posts
    5
    Rep Power
    0

    Default teach me to code.

    Hi i am new to java and i am trying to fiqure out how to programme could some please help me to start of and possibly give me some pointers to help me get started off.

    I have been given the fellowing class and asked to programme in these but i have no clue where to start.


    package com.fdm.bank;

    import java.util.List;


    public class BankManager implements _BankManager
    {

    public BankAccountOutputVO ViewAccountSummary(String accountNumber)
    {

    return null;

    }


    public BankAccountOutputVO closeAcount(String accountNumber)
    {
    return null;
    }

    public BankAccountOutputVO createNewCurrentAccount(String name,
    double amount, double overdraftLimit)
    {
    return null;
    }

    public BankAccountOutputVO createNewSavingsAccount(String name,
    double amount)
    {
    // TODO Auto-generated method stub
    return null;

    }

    public List<BankAccountOutputVO> listAllAccounts()
    {
    // TODO Auto-generated method stub
    return null;
    }

    public BankAccountOutputVO makeDeposit(String accountNumber, double amount)
    {
    // TODO Auto-generated method stub
    return null;
    }

    public BankAccountOutputVO makeWithdrawal(String accountNumber,
    double amount)
    {
    // TODO Auto-generated method stub
    return null;
    }
    }


    //second class




    package com.fdm.bank;

    import java.util.List;


    public interface _BankManager {

    /**
    * Creates a new current account and then returns details to user
    * @param name
    * @param amount
    * @param overdraftLimit
    * @return The value object holding summary details for this account
    */
    public BankAccountOutputVO createNewCurrentAccount(String name,
    double amount, double overdraftLimit);

    /**
    *
    * @param name
    * @param amount
    * @return The value object holding summary details for this account
    */
    public BankAccountOutputVO createNewSavingsAccount(String name,
    double amount);

    /**
    *
    * @param accountNumber
    * @param amount
    * @return The value object holding summary details for this account
    */
    public BankAccountOutputVO makeDeposit(String accountNumber, double amount);

    /**
    *
    * @param accountNumber
    * @param amount
    * @return The value object holding summary details for this account
    */
    public BankAccountOutputVO makeWithdrawal(String accountNumber,
    double amount);

    /**
    *
    * @return The list of all accounts currently held in the bank. This list
    * must consist of objects of type BankAccountOutputVO.
    */
    public List<BankAccountOutputVO> listAllAccounts();

    /**
    *
    * @param accountNumber
    * @return The value object holding summary details for this account
    */
    public BankAccountOutputVO ViewAccountSummary(String accountNumber);

    /**
    *
    * @param accountNumber
    * @return The value object holding summary details for this account
    */
    public BankAccountOutputVO closeAcount(String accountNumber);
    }



    //third class


    package com.fdm.bank;

    public final class BankAccountOutputVO
    {
    private final String accountNumber;
    private final String accountType;
    private final String name;
    private final String balance;
    private final String overdraft;
    private final boolean successfulTransaction;

    public BankAccountOutputVO(String accountNumber, String accountType, String name, String overdraft, String balance, boolean successfulTransaction)
    {
    this.accountNumber = accountNumber;
    this.accountType = accountType;
    this.name = name;
    this.overdraft = overdraft;
    this.balance = balance;
    this.successfulTransaction = successfulTransaction;
    }

    public boolean isSuccessfulTransaction()
    {
    return successfulTransaction;
    }

    public String getAccountNumber()
    {
    return accountNumber;
    }

    public String getBalance()
    {
    return balance;
    }

    public String getName()
    {
    return name;
    }

    public String getAccountType()
    {
    return accountType;
    }

    public String getOverdraft()
    {
    return overdraft;
    }
    }

    Thank you
    Last edited by Taher; 08-02-2010 at 11:09 AM.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,016
    Rep Power
    20

    Default

    You've been asked to code the BankManager class, as far as I can tell...so you need to figure out what has to go in there. Start with what data the BankManager needs to have.

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Please don't simply dump your code or homework here and ask others to do it for you. Best to make attempts to solve this yourself first and then if you get stuck, ask a specific question. Much luck.

  4. #4
    Taher is offline Member
    Join Date
    Aug 2010
    Posts
    5
    Rep Power
    0

    Default

    i am just trying to learn how to code in java. this is not a pice of home work or corsework. Thank you i got this code to help me to learn how to programme, but i am not sure where to start

    I have tried to do the following but not sure how so display the information for each new account instead of hard coding the information like i have done.

    package com.fdm.bank;

    import java.util.List;


    public class BankManager implements _BankManager
    {

    public BankAccountOutputVO ViewAccountSummary(String accountNumber)
    {

    return null;

    }


    public BankAccountOutputVO closeAcount(String accountNumber)
    {
    return null;
    }

    public BankAccountOutputVO createNewCurrentAccount(String name,
    double amount, double overdraftLimit)
    {
    BankAccountOutputVO acc = new BankAccountOutputVO("10", "Currrent", "Taher", "250", "100", true);


    return null;

    }

    public BankAccountOutputVO createNewSavingsAccount(String name,
    double amount)
    {
    // TODO Auto-generated method stub
    return null;

    }

    public List<BankAccountOutputVO> listAllAccounts()
    {
    // TODO Auto-generated method stub
    return null;
    }

    public BankAccountOutputVO makeDeposit(String accountNumber, double amount)
    {
    // TODO Auto-generated method stub
    return null;
    }

    public BankAccountOutputVO makeWithdrawal(String accountNumber,
    double amount)
    {
    // TODO Auto-generated method stub
    return null;
    }
    }


    Thank Again for your help.
    Last edited by Taher; 08-02-2010 at 02:37 PM.

  5. #5
    Taher is offline Member
    Join Date
    Aug 2010
    Posts
    5
    Rep Power
    0

    Default

    I have also added the fellowing clases.
    package com.fdm.bank;

    public class SavingAccount extends Account{

    String interest;

    public String getInterest()
    {
    return interest;
    }

    }


    package com.fdm.bank;

    public class CurrentAccount extends Account {

    int overdraft;


    public int setOverdraft()
    {
    overdraft=500;
    return overdraft;
    }

    public int getOverdraft()
    {
    return overdraft;
    }

    }

    package com.fdm.bank;

    public class Account {
    String name;
    String accountNumber;
    String balance;
    String accountType;
    boolean successfulTransaction;

    public String getAccountNumber() {
    return accountNumber;
    }

    public String getBalance() {
    return balance;
    }

    public String getName() {
    return name;
    }

    public String getAccountType() {
    return accountType;
    }

    }

Similar Threads

  1. Teach Me Pls How To Compile Java Program Using CMD
    By Lilsimple in forum Java Applets
    Replies: 1
    Last Post: 03-11-2010, 04:26 PM
  2. Replies: 1
    Last Post: 03-04-2010, 11:19 AM
  3. Convert java code to midlet code
    By coldvoice05 in forum New To Java
    Replies: 1
    Last Post: 08-12-2009, 11:14 AM
  4. Convert java code to midlet code
    By coldvoice05 in forum Advanced Java
    Replies: 1
    Last Post: 08-09-2009, 01:21 PM
  5. Replies: 1
    Last Post: 04-26-2007, 03:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •