Professional Documents
Culture Documents
11ss Design Solutionk RPT PDF
11ss Design Solutionk RPT PDF
11ss Design Solutionk RPT PDF
Version 2003
Mastering OOAD with UML Issue: v2003
Payroll System Subsystem Design Solution Issue Date: February 2003
11ss_design_solutionk_rpt.doc
Revision History
Date Issue Description Author
09/01/2000 V2000 Generated for beta Shawn Siemers
10/03/2000 V2000 Final release Shawn Siemers
01/14/2003 V2003 Final Release Alex Kutsick
Table of Contents
1. Exercise: Subsystem Design 5
1.1 BankSystem 5
1.1.1 Interface Realizations 5
1.1.2 Subsystem Dependencies Class Diagram 7
1.2 PrintService 7
1.2.1 Interface Realizations 7
1.2.2 Subsystem Dependencies Class Diagram 10
1.3 ProjectManagementDatabase 10
1.3.1 Interface Realizations 10
1.3.2 Subsystem Dependencies Class Diagram 14
1. deposit(Paycheck, BankInformation)
1.1. / / getAmount( )
BankSyste : :
mClient BankSystem Paycheck
1.3. submit(BankTransaction)
1.2. create(Deposit, paycheckAmount, BankInformation.routingNumber)
: BankSystemInterface
: BankTransact ion
1.3.1. // submit(BankTransaction)
: Bank System
IBankSystem::deposit
1. deposit(Paycheck, BankInformation)
1.1. / / getAmount ( )
1.3. submit(BankTransaction)
1.3.1. // submit(BankTransaction)
IBankSystem
<<Interface>>
IBankSystem
(from External System Interfaces)
<<entity>>
+ deposit(aPaycheck : Paycheck, intoBank : BankInformation) Paycheck
(from Payroll Artifacts)
BankInformation
- amount
0..1 (from Payroll Artifacts)
+ name : String
+ // create with amount(forAmount : float) : Paycheck
+ routingNumber : String
+ // getAmount()
+ // getEmployee() : Employee
<<subsystem proxy>>
BankSystem
0..*
BankSystemInterface
BankTransaction
- amount : float
- transactionOperation : BankOperation
- routingNumber : String
<<subsystem>>
BankSys tem
(from Business Services)
To acces s t he
subsystem interface
External System
Interfac es
(from Business Services)
Payroll Artifacts
(from Business Services)
1.2 PrintService
1. print(Paycheck, String)
1.2. / / print(theImage)
PrintService : : 1.2.1. // print( )
Client PrintService PrinterInterface
: PaycheckPrinterImage
1.1.1. // getEmployee( )
1.1.4. // getAmount( )
1.1.2. // getEmployeeName( )
1.1.3. // get Employee ID( )
:
: Employee Paycheck
IPrintService::print
1. print(Paycheck, String)
1.1. // create(Paychec k)
1.1.1. // getEmployee( )
Create an image of Include similar
the Paycheck from 1.1.2. // getEmployeeName( ) operat ions for all
the given Paycheck Employee
for the specified informat ion that is
Printer 1.1.3. // get Employee ID( ) to appear on the
printed Paycheck
1.1.4. // getAmount( )
Build an image of the
Paycheck from the Include similar
retrieved data for a operations for all
1.1.5. // buildPrintImage( ) Paycheck
specific Print er
information that is
to appear on the
printed Paycheck
Print the
generated
1.2. // print(theImage)
image 1.2.1. // print( )
IPrintService
<<Interface>>
IPrintService
(from External System Interfaces)
<<subsystem proxy>>
PrinterInterface
PrintService
1 0..* + // print(theImage)
+ print(aPaycheck : Paycheck, onPrinter : String)
1
{ one-to-one }
PrinterImage
0..1 <<entity>>
<<entity>>
Employee
Paycheck
(from Payroll Artifacts)
(from Payroll Artifacts)
- name
- amount
- employee id : int
- social security number
+ // create with amount(forAmount : float) : Paycheck
- address
+ // getAmount()
+ // getEmployee() : Employee
+ // get Employee ID() : int
<<subsystem>>
PrintService
To access the subsystem
interface (from Business Services)
External System
Interfaces
(from Business Services)
Payroll Artifacts
(from Business Services)
1.3 ProjectManagementDatabase
ProjectManagement
DatabaseClient
1. getChargeNumbers(S tring)
1.1.3. new( )
1.1. getChargeNums(string)
1.1.7. add(ChargeNum)
: :
: ChargeNumList
ProjectManagementDatabase DBChargeNumbers
:
Statement : Connection
: Project
Management
IProjectManagementDatabase::getChargeNumbers
To read a class, the ProjectManagementDatabase proxy class asks the DBChargeNumbers class for the list of available charge numbers
from the database. The DBChargeNumbers creates a new statement using the Connection class createStatement() operation. The
statement is executed and the data is returned in a ResultSet object. The DBChargeNumbers then creates a new instance of the
ChargeNum persistent class and populates it with the retrieved data. The data is returned in a collection object, the ChargeNumList class.
IProjectManagementDatabase::initialize
ProjectManagement : : :
: Project
Database Client ProjectManagementDatabase DBChargeNumbers DriverManager
Management
1. initialize( )
1.1. initialize( )
IProjectManagementDatabase::initialize
1. initialize( )
ProjectManagementD :
atabase Client ProjectManagementDatabase
1.1. initialize( )
:
DBChargeNumbers
: Project
Management
IProjectManagementDatabase
<<Interface>> A "plural" DBClass was defined
IProjectManagementDatabase because the charge numbers
(from External System Interfaces) always are retrieved as a set (a
list of the available charge
+ getChargeNumbers(criteria : String) : chargeNumList numbers).
<<subsystem proxy>>
ProjectManagementDatabase
DBChargeNumbers
+ getChargeNumbers(criteria : String) : chargeNumList
+ initialize() 1 1 + getChargeNums(criteria : string) : ChargeNumList
+ initialize()
1
1
1
Statement
ChargeNumList 0..1
(from java.sql)
(from Payroll Artifacts)
+ new() + executeQuery()
+ executeUpdate()
+ add(theChargeNum : ChargeNum)
1 ResultSet
(from java.sql)
0..* + getString()
ChargeNum 0..*
(from Payroll Artifacts)
- projectName
- value
+ // getProjectName() DriverManager
+ // getValue() (from java.sql)
+ new(projectName, value)
1
+ getConnection()
Connection
(from java.sql)
+ createStatement()
<<subsystem>>
To access the ProjectManagementDatabase
subsystem interface
(from Business Services)
External System
Interfaces
(from Business Services)
java.sql
(from Middleware)