Bank Account Program - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Bank Account Program

stevensinghstevensingh Posts: 13Member
Hello,

I have the following assignment to do and do not know where to start. Could anyone give me a structure and some hints so I can get started.


Scenario:

A large multi-national bank has commissioned you to design and develop a worldwide Internet banking account. The solution should offer the following levels of service:

 A standard Current deposit account.
 A high-interest Platinum savings account.
 An interest-free Student account.

All three accounts can be opened with or without an opening deposit, each account being identified by an account name and account number. In addition, account holders may deposit or withdraw funds and/or request balance details at any time.

For the Platinum and Student accounts, interest will be charged or earned depending upon the balance and any agreed overdraft limit (overdrafts are normally set at 2.5 times the initial deposit).

Tasks:

1. Create a class for each type of account.
2. Create constructors for each class, using inheritance, where possible.
3. Create methods for depositing and withdrawing funds as well as methods for displaying the current balance.
4. For those account types that have an overdraft, create additional methods to check the account balance against the agreed overdraft limit. If the overdraft limit is exceeded a suitable message should be displayed by the application.

Many Thanks.

Comments

  • nightsurfernightsurfer Posts: 272Member
    Looks like the standard inheritance assignment. Here's what you should do: create a general class called Account, which has methods for opening a new account, for making deposits, withdrawels, and collecting interest. As well, provide accessor methods for getting the balence, etc.

    Next, create 3 subclasses called Current, Student, and Platinum. Each class will inherit the Account class, and override some of the methods. For example, the student class will override the method that deducts interest on the overdraft, the Platinum account will override the method that adds interest, and so on.

    Hope this helps.



    : Scenario:
    :
    : A large multi-national bank has commissioned you to design and develop a worldwide Internet banking account. The solution should offer the following levels of service:
    :
    :  A standard “Current” deposit account.
    :  A high-interest “Platinum” savings account.
    :  An interest-free “Student” account.
    :
    : All three accounts can be opened with or without an opening deposit, each account being identified by an account name and account number. In addition, account holders may deposit or withdraw funds and/or request balance details at any time.
    :
    : For the “Platinum” and “Student” accounts, interest will be charged or earned depending upon the balance and any agreed overdraft limit (overdrafts are normally set at 2.5 times the initial deposit).
    :
    : Tasks:
    :
    : 1. Create a class for each type of account.
    : 2. Create constructors for each class, using inheritance, where possible.
    : 3. Create methods for depositing and withdrawing funds as well as methods for displaying the current balance.
    : 4. For those account types that have an overdraft, create additional methods to check the account balance against the agreed overdraft limit. If the overdraft limit is exceeded a suitable message should be displayed by the application.
    :
    : Many Thanks.
    :
    :

    There are two methods in software design. One is to make the program so simple, there are obviously no errors. The other is to make it so complicated, there are no obvious errors.

  • stevensinghstevensingh Posts: 13Member
    : Looks like the standard inheritance assignment. Here's what you should do: create a general class called Account, which has methods for opening a new account, for making deposits, withdrawels, and collecting interest. As well, provide accessor methods for getting the balence, etc.
    :
    : Next, create 3 subclasses called Current, Student, and Platinum. Each class will inherit the Account class, and override some of the methods. For example, the student class will override the method that deducts interest on the overdraft, the Platinum account will override the method that adds interest, and so on.
    :
    : Hope this helps.
    :
    :
    :
    : : Scenario:
    : :
    : : A large multi-national bank has commissioned you to design and develop a worldwide Internet banking account. The solution should offer the following levels of service:
    : :
    : :  A standard “Current” deposit account.
    : :  A high-interest “Platinum” savings account.
    : :  An interest-free “Student” account.
    : :
    : : All three accounts can be opened with or without an opening deposit, each account being identified by an account name and account number. In addition, account holders may deposit or withdraw funds and/or request balance details at any time.
    : :
    : : For the “Platinum” and “Student” accounts, interest will be charged or earned depending upon the balance and any agreed overdraft limit (overdrafts are normally set at 2.5 times the initial deposit).
    : :
    : : Tasks:
    : :
    : : 1. Create a class for each type of account.
    : : 2. Create constructors for each class, using inheritance, where possible.
    : : 3. Create methods for depositing and withdrawing funds as well as methods for displaying the current balance.
    : : 4. For those account types that have an overdraft, create additional methods to check the account balance against the agreed overdraft limit. If the overdraft limit is exceeded a suitable message should be displayed by the application.
    : :
    : : Many Thanks.
    : :
    : :
    :
    : There are two methods in software design. One is to make the program so simple, there are obviously no errors. The other is to make it so complicated, there are no obvious errors.
    :
    :
    Many Thanks - I like the simple program method in software design by the way.
  • stevensinghstevensingh Posts: 13Member
    Sorry, I am a complete Java novice - can you be more explicit with regard to the Account parent class.

    : : Looks like the standard inheritance assignment. Here's what you should do: create a general class called Account, which has methods for opening a new account, for making deposits, withdrawels, and collecting interest. As well, provide accessor methods for getting the balence, etc.
    : :
    : : Next, create 3 subclasses called Current, Student, and Platinum. Each class will inherit the Account class, and override some of the methods. For example, the student class will override the method that deducts interest on the overdraft, the Platinum account will override the method that adds interest, and so on.
    : :
    : : Hope this helps.
    : :
    : :
    : :
    : : : Scenario:
    : : :
    : : : A large multi-national bank has commissioned you to design and develop a worldwide Internet banking account. The solution should offer the following levels of service:
    : : :
    : : :  A standard “Current” deposit account.
    : : :  A high-interest “Platinum” savings account.
    : : :  An interest-free “Student” account.
    : : :
    : : : All three accounts can be opened with or without an opening deposit, each account being identified by an account name and account number. In addition, account holders may deposit or withdraw funds and/or request balance details at any time.
    : : :
    : : : For the “Platinum” and “Student” accounts, interest will be charged or earned depending upon the balance and any agreed overdraft limit (overdrafts are normally set at 2.5 times the initial deposit).
    : : :
    : : : Tasks:
    : : :
    : : : 1. Create a class for each type of account.
    : : : 2. Create constructors for each class, using inheritance, where possible.
    : : : 3. Create methods for depositing and withdrawing funds as well as methods for displaying the current balance.
    : : : 4. For those account types that have an overdraft, create additional methods to check the account balance against the agreed overdraft limit. If the overdraft limit is exceeded a suitable message should be displayed by the application.
    : : :
    : : : Many Thanks.
    : : :
    : : :
    : :
    : : There are two methods in software design. One is to make the program so simple, there are obviously no errors. The other is to make it so complicated, there are no obvious errors.
    : :
    : :
    : Many Thanks - I like the simple program method in software design by the way.
    :

  • nightsurfernightsurfer Posts: 272Member
    OK, here are the basics of inheritance. You have a class called Parent that has some methods, say setName(String s), String getName(), and so on. You then can make a class called Child which would inherit Parent. The child class then has access to all the methods from the parent class, plus it can write its own methods, or rewrite (called overriding) any of the methods from the parent.

    So here are your class declarations:

    [code]
    public class Parent {
    public Parent(String name) {
    personName = name;
    }
    public void setName(String name) {
    personName = name;
    }
    public String getName() {
    return personName;
    }
    }
    [/code]

    And then you would have your child class as follows:

    [code]
    public class Child extends Parent {
    public Child(String name) {
    super(name);
    }
    public String getName() {
    return "child: " + super.getName();
    }
    }
    [/code]

    What is happening is that your parent has some methods, which the child can also use. If the method is not defined in the Child class, it is assumed to be the same as the method in the Parent class. If the method is defined in both classes, then the method from the Child class will be used.

    Hope this helps.


    There are two methods in software design. One is to make the program so simple, there are obviously no errors. The other is to make it so complicated, there are no obvious errors.

Sign In or Register to comment.