oose07 - bank accounts management system

Upload: faiz10march6456

Post on 30-May-2018

234 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/14/2019 OOSE07 - Bank Accounts Management System

    1/14

    Lethbridge/Laganire 2002 Chapter 5: Modelling with classes - Bank Account Problem x1

    Bank Accounts Management System - p. 448This system provides the basic services to manage bank accounts at a bank

    called OOBank. OOBank has many branches, each of which has an address

    and branch number. A client opens accounts at a branch. Each account is

    uniquely identified by an account number; it has a balance and a credit or

    overdraft limit. There are many types of accounts, including: A mortgage

    account (which has a property as collateral), a chequing account, and a credit

    card account (which has an expiry date and can have secondary cards attached

    to it). It is possible to have a joint account (e.g. for a husband and wife). Eachtype of account has a particular interest rate, a monthly fee and a specific set

    of privileges (e.g. ability to write cheques, insurance for purchases etc.

    OOBank is divided into divisions and subdivisions (such as Planning,

    Investments and Consumer), the branches are considered subdivisions of the

    Consumer Division. Each division has a manager and a set of otheremployees. Each customer is assigned a particular employee as his or her

    personal banker.

  • 8/14/2019 OOSE07 - Bank Accounts Management System

    2/14

    Lethbridge/Laganire 2002 Chapter 5: Modelling with classes - Bank Account Problem x2

    Marking nouns: potentially good classes, definitely

    badclasses, and classes we are unsure aboutThissystem provides the basic services to managebank accounts at abank

    called OOBank. OOBank has manybranches, each of which has an address

    and branchnumber. A client opens accounts at a branch. Each account is

    uniquely identified by an account number; it has a balance and a credit or

    overdraft limit. There are many types of accounts, including: A mortgage

    account (which has aproperty as collateral), a chequing account, and a credit

    card account (which has an expiry date and can have secondary cards attached

    to it). It is possible to have ajoint account(e.g. for a husbandand wife). Eachtype of account has a particularinterest rate, a monthly fee and a specific set

    ofprivileges (e.g. ability to write cheques, insurance forpurchases etc.

    OOBank is divided into divisions andsubdivisions (such asPlanning,

    Investments and Consumer), the branches are considered subdivisions of the

    Consumer Division. Each division has a managerand a set of otheremployees. Each customer is assigned a particular employee as his or her

    personal banker.

  • 8/14/2019 OOSE07 - Bank Accounts Management System

    3/14

    Lethbridge/Laganire 2002 Chapter 5: Modelling with classes - Bank Account Problem x3

    Draft Class Diagram with classes Clientand Account, and their association

    accountHolder

    Client

    Account

    accountNumbertype

    *

    1..2

  • 8/14/2019 OOSE07 - Bank Accounts Management System

    4/14

    Lethbridge/Laganire 2002 Chapter 5: Modelling with classes - Bank Account Problem x4

    Draft Class Diagram with Accountattributes and subclasses

    accountHolde

    Client

    MortgageAccountChequingAccount

    Account

    accountNumberopenedDateclosedDateinterestRatemonthlyFeebalancecreditOrOverdraftLimit

    CreditCardAccount

    *

    *

    1..2

  • 8/14/2019 OOSE07 - Bank Accounts Management System

    5/14

    Lethbridge/Laganire 2002 Chapter 5: Modelling with classes - Bank Account Problem x5

    Draft Class Diagram with CreditCardand attributes ofAccount subclasses

    Client

    MortgageAccount

    collateralProperty

    ChequingAccount

    Account

    accountNumberopenedDateclosedDateinterestRatemonthlyFeebalancecreditOrOverdraftLimit

    CreditCardAccount

    expiryDatebrand

    CreditCard

    name

    *

    1..*

    *

    1..2accountHolder

  • 8/14/2019 OOSE07 - Bank Accounts Management System

    6/14

    Lethbridge/Laganire 2002 Chapter 5: Modelling with classes - Bank Account Problem x6

    Problem statement - checking off what we have done(Classes, associations, attributes, generalizations)

    Thissystem provides the basic services to managebank accounts at abank

    called OOBank. OOBank has manybranches, each of which has an address

    and branchnumber. A client opens accounts at a branch. Each account is

    uniquely identified by an account number; it has a balance and a credit or

    overdraft limit. There are many types of accounts, including: A mortgage

    account (which has aproperty as collateral), a chequing account, and a credit

    card account (which has an expiry date and can have secondary cards attached

    to it). It is possible to have ajoint account(e.g. for a husbandand wife). Eachtype of account has a particularinterest rate, a monthly fee and a specific set

    ofprivileges (e.g. ability to write cheques, insurance forpurchases etc.

    OOBank is divided into divisions andsubdivisions (such asPlanning,

    Investments and Consumer), the branches are considered subdivisions of the

    Consumer Division. Each division has a managerand a set of otheremployees. Each customer is assigned a particular employee as his or her

    personal banker.

  • 8/14/2019 OOSE07 - Bank Accounts Management System

    7/14 Lethbridge/Laganire 2002 Chapter 5: Modelling with classes - Bank Account Problem x7

    Looking at what we know about Employees(Classes, associations, attributes, generalizations)

    Thissystem provides the basic services to managebank accounts at abankcalled

    OOBank. OOBank has manybranches, each of which has an address and branch

    number. A client opens accounts at a branch. Each account is uniquely identified

    by an account number; it has a balance and a credit or overdraft limit. There are

    many types of accounts, including: A mortgage account (which has aproperty as

    collateral), a chequing account, and a credit card account (which has an expiry

    date and can have secondary cards attached to it). It is possible to have ajoint

    account(e.g. for a husbandand wife). Each type of account has a particularinterest rate, a monthly fee and a specific set ofprivileges (e.g. ability to write

    cheques, insurance forpurchases etc. OOBank is divided into divisions and

    subdivisions (such asPlanning,Investments and Consumer), the branches are

    considered subdivisions of the Consumer Division. Each division has a

    manager and a set of other employees. Each customer is assigned a

    particular employee as his or her personal banker.

  • 8/14/2019 OOSE07 - Bank Accounts Management System

    8/14

    Lethbridge/Laganire 2002 Chapter 5: Modelling with classes - Bank Account Problem x8

    Draft Class Diagram with Branch andEmployee

    accountHolder

    Client

    MortgageAccount

    collateralProperty

    ChequingAccount

    Branch

    Account

    accountNumberopenedDateclosedDateinterestRatemonthlyFeebalancecreditOrOverdraftLimit

    CreditCardAccount

    expiryDatebrand

    CreditCard

    name

    Employee

    *

    personalBanker*

    1..*

    *

    1..2

  • 8/14/2019 OOSE07 - Bank Accounts Management System

    9/14

    Lethbridge/Laganire 2002 Chapter 5: Modelling with classes - Bank Account Problem x9

    Looking at what we know about Branches(Classes, associations, attributes, generalizations)

    Thissystem provides the basic services to managebank accounts at abank

    called OOBank. OOBank has manybranches, each of which has an

    address and branchnumber. A client opens accounts at a branch. Each

    account is uniquely identified by an account number; it has a balance and

    a credit or overdraft limit. There are many types of accounts, including: A

    mortgage account (which has aproperty as collateral), a chequing

    account, and a credit card account (which has an expiry date and can have

    secondary cards attached to it). It is possible to have ajoint account(e.g.

    for a husbandand wife). Each type of account has a particularinterest

    rate, a monthly fee and a specific set ofprivileges (e.g. ability to write

    cheques, insurance forpurchases etc. OOBank is divided into divisions

    andsubdivisions (such asPlanning,Investments and Consumer), the

    branches are considered subdivisions of the Consumer Division. Eachdivision has a managerand a set of otheremployees. Each customer is

    assigned a particular employee as his or her personal banker.

  • 8/14/2019 OOSE07 - Bank Accounts Management System

    10/14

    Lethbridge/Laganire 2002 Chapter 5: Modelling with classes - Bank Account Problemx10

    Draft Class Diagram withOrganizationalUnit

    *

    accountHolder

    Client

    MortgageAccount

    collateralProperty

    ChequingAccount

    Branch

    OrganizationalUnit

    Account

    accountNumberopenedDateclosedDateinterestRatemonthlyFeebalancecreditOrOverdraftLimit

    CreditCardAccount

    expiryDatebrand

    CreditCard

    name

    subdivision

    Employee

    *

    manager0..1

    0..1 *

    worksFor

    personalBanker*

    1..*

    0..1

    *

    1..2

  • 8/14/2019 OOSE07 - Bank Accounts Management System

    11/14

    Lethbridge/Laganire 2002 Chapter 5: Modelling with classes - Bank Account Problemx11

    Problem statement after addingOrganizationalUnit(Classes, associations, attributes, generalizations)

    Thissystem provides the basic services to managebank accounts at abank

    called OOBank. OOBank has manybranches, each of which has an address

    and branchnumber. A client opens accounts at a branch. Each account is

    uniquely identified by an account number; it has a balance and a credit or

    overdraft limit. There are many types of accounts, including: A mortgage

    account (which has aproperty as collateral), a chequing account, and a credit

    card account (which has an expiry date and can have secondary cards attached

    to it). It is possible to have ajoint account(e.g. for a husbandand wife). Eachtype of account has a particularinterest rate, a monthly fee and a specific set

    ofprivileges (e.g. ability to write cheques, insurance forpurchases etc.

    OOBank is divided into divisions andsubdivisions (such asPlanning,

    Investments and Consumer), the branches are considered subdivisions of the

    Consumer Division. Each division has a managerand a set of other

    employees. Each customer is assigned a particular employee as his or her

    personal banker.

  • 8/14/2019 OOSE07 - Bank Accounts Management System

    12/14

  • 8/14/2019 OOSE07 - Bank Accounts Management System

    13/14

    Lethbridge/Laganire 2002 Chapter 5: Modelling with classes - Bank Account Problemx13

    Draft Class Diagramwith AccountType

    *

    accountHolder

    Client

    MortgageAccount

    collateralProperty

    AccountType

    interestRatemonthlyFeechecksAllowedinsuranceAvailable

    ChequingAccount

    Branch

    OrganizationalUnit

    Account

    accountNumberopenedDateclosedDateinterestRatemonthlyFeebalancecreditOrOverdraftLimit

    CreditCardAccount

    expiryDatebrand

    CreditCard

    name

    subdivision

    Employee

    *

    manager0..1

    0..1 *

    worksFor

    personalBanker*

    1..*

    *

    0..1

    *

    1..2

  • 8/14/2019 OOSE07 - Bank Accounts Management System

    14/14

    Lethbridge/Laganire 2002 Chapter 5: Modelling with classes - Bank Account Problemx14

    Bank Account System Class diagramwith final touches

    *

    accountHolder

    Client

    name

    MortgageAccount

    collateralProperty

    AccountType

    interestRatemonthlyFeechecksAllowedinsuranceAvailableperiodicFeeperiod

    ChequingAccount

    Branch

    addressnumber

    OrganizationalUnit

    Person

    Account

    accountNumberopenedDateclosedDateinterestRatemonthlyFeebalancecreditOrOverdraftLimit

    CreditCardAccount

    expiryDatebrand

    CreditCard

    name

    subdivision

    Employee

    *

    manager0..1

    0..1 *

    worksFor

    personalBanker*

    1..*

    *

    0..1

    *

    1..2