slides for chapter 5 video

Upload: muchimp

Post on 30-May-2018

248 views

Category:

Documents


1 download

TRANSCRIPT

  • 8/14/2019 Slides for Chapter 5 Video

    1/14

    Lethbridge/Laganire 2002 Chapter 5: Modelling with classes - Bank Account Pro 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 anaddress 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). Each type 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 other employees.

    Each customer is assigned a particular employee as his or her personal

    banker.

  • 8/14/2019 Slides for Chapter 5 Video

    2/14

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

    Marking nouns: potentially good classes, definitely

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

    bankcalled OOBank. OOBank has manybranches, each of which has anaddress 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. 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 Slides for Chapter 5 Video

    3/14

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

    Draft Class Diagram with classes Clientand Account, and their association

    accountHolder

    Client

    Account

    accountNumbertype

    *

    1..2

  • 8/14/2019 Slides for Chapter 5 Video

    4/14

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

    Draft Class Diagram with Accountattributes and subclasses

    accountHolder

    Client

    MortgageAccountChequingAccount

    Account

    accountNumberopenedDateclosedDateinterestRatemonthlyFeebalancecreditOrOverdraftLimit

    CreditCardAccount

    *

    *

    1..2

  • 8/14/2019 Slides for Chapter 5 Video

    5/14

    Lethbridge/Laganire 2002 Chapter 5: Modelling with classes - Bank Account Pro 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 Slides for Chapter 5 Video

    6/14

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

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

    Thissystem provides the basic services to managebank accounts at a

    bankcalled 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. 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 Slides for Chapter 5 Video

    7/14

  • 8/14/2019 Slides for Chapter 5 Video

    8/14

    Lethbridge/Laganire 2002 Chapter 5: Modelling with classes - Bank Account Pro 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 Slides for Chapter 5 Video

    9/14

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

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

    Thissystem provides the basic services to managebank accounts at a

    bankcalled 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 ConsumerDivision. 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 Slides for Chapter 5 Video

    10/14

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

    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 Slides for Chapter 5 Video

    11/14

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

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

    Thissystem provides the basic services to managebank accounts at a

    bankcalled 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. 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 Slides for Chapter 5 Video

    12/14

  • 8/14/2019 Slides for Chapter 5 Video

    13/14

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

    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 Slides for Chapter 5 Video

    14/14

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

    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