Bank Accounts Management System - p. 448 This 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). 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’. © Lethbridge/Laganière 2002 Chapter 5: Modelling with classes - Bank Account Problem x1 Marking nouns: potentially good classes, definitely bad classes, and classes we are unsure about This 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). 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’. © Lethbridge/Laganière 2002 Chapter 5: Modelling with classes - Bank Account Problem x2 Draft Class Diagram with classes Client and Account, and their association Client 1..2 acco untHol der Account * acco untNum ber type © Lethbridge/Laganière 2002 Chapter 5: Modelling with classes - Bank Account Problem x3 Draft Class Diagram with Account attributes and subclasses Client * 1..2 acco untHol der * Account acco untNum ber op ened Da te close dDate in teres tRate mo nthl yFee ba lance creditOrOverdra ftLi mit ChequingAccount © Lethbridge/Laganière 2002 MortgageAccount CreditCardAccount Chapter 5: Modelling with classes - Bank Account Problem x4 Draft Class Diagram with CreditCard and attributes of Account subclasses Client * 1..2 accou ntHold er * Account accou ntNumb er ope nedDate cl osed Da te interestRa te mon thlyFe e bal ance cre ditOrOverdraftLim it CreditCard nam e 1..* ChequingAccount MortgageAccount co llateralPro perty © Lethbridge/Laganière 2002 CreditCardAccount expiryDate bran d Chapter 5: Modelling with classes - Bank Account Problem x5 Problem statement - checking off what we have done (Classes, associations, attributes, generalizations) This 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). 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’. © Lethbridge/Laganière 2002 Chapter 5: Modelling with classes - Bank Account Problem x6 Looking at what we know about Employees (Classes, associations, attributes, generalizations) This 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). 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’. © Lethbridge/Laganière 2002 Chapter 5: Modelling with classes - Bank Account Problem x7 Draft Class Diagram with Branch and Employee Client Employee * pers onal Banker Branch * Account 1..2 accou ntHold er * accou ntNumb er ope nedDate cl osed Da te interestRa te mon thlyFe e bal ance cre ditOrOverdraftLim it CreditCard nam e 1..* ChequingAccount MortgageAccount co llateralPro perty © Lethbridge/Laganière 2002 CreditCardAccount expiryDate bran d Chapter 5: Modelling with classes - Bank Account Problem x8 Looking at what we know about Branches (Classes, associations, attributes, generalizations) This 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). 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’. © Lethbridge/Laganière 2002 Chapter 5: Modelling with classes - Bank Account Problem x9 Draft Class Diagram with OrganizationalUnit worksFor su bdivis ion * Organiz ationalUnit 0..1 ma nage r 0..1 * 0..1 Employee Client * pe rsona lBanker Branch * Account 1..2 acco untHol der * acco untNum ber op ened Da te close dDate in teres tRate mo nthl yFee ba lance creditOrOverdra ftLi mit CreditCard na me 1..* ChequingAccount MortgageAccount colla teral Property © Lethbridge/Laganière 2002 CreditCardAccount expi ryDate bra nd Chapter 5: Modelling with classes - Bank Account Problem x10 Problem statement after adding OrganizationalUnit (Classes, associations, attributes, generalizations) This 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). 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’. © Lethbridge/Laganière 2002 Chapter 5: Modelling with classes - Bank Account Problem x11 Thinking about how to deal with privileges (Classes, associations, attributes, generalizations) This 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). 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’. © Lethbridge/Laganière 2002 Chapter 5: Modelling with classes - Bank Account Problem x12 Draft Class Diagram with AccountType works For sub divisi on * OrganizationalUnit 0..1 man ager 0..1 Employee AccountType Client * interestRa te mon thlyFe e ch ecksAl lowed ins uranceAvai labl e Branch * 0..1 pers onal Banker 1..2 accou ntHold er * * Account * accou ntNumb er ope nedDate cl osed Da te interestRa te mon thlyFe e bal ance cre ditOrOverdraftLim it CreditCard nam e 1..* ChequingAccount MortgageAccount co llateralPro perty © Lethbridge/Laganière 2002 CreditCardAccount expiryDate bran d Chapter 5: Modelling with classes - Bank Account Problem x13 Bank Account System Class diagram with final touches works For Person sub divisi on * nam e OrganizationalUnit 0..1 man ager 0..1 Employee AccountType add ress num ber Client * interestRa te mon thlyFe e ch ecksAl lowed ins uranceAvai labl e peri odicFee peri od Branch * 0..1 pers onal Banker 1..2 accou ntHold er * * Account * accou ntNumb er ope nedDate cl osed Da te interestRa te mon thlyFe e bal ance cre ditOrOverdraftLim it CreditCard nam e 1..* ChequingAccount MortgageAccount co llateralPro perty © Lethbridge/Laganière 2002 CreditCardAccount expiryDate bran d Chapter 5: Modelling with classes - Bank Account Problem x14
© Copyright 2026 Paperzz