03 Dev475 Ex Workbook Main
03 Dev475 Ex Workbook Main
Version 2004
Section 1: Course Registration Requirements
Problem Statement
As the head of information systems for Wylie College you are tasked with developing a new student registration
system. The college would like a new client-server system to replace its much older system developed around
mainframe technology. The new system will allow students to register for courses and view report cards from
personal computers attached to the campus LAN. Professors will be able to access the system to sign up to teach
courses as well as record grades.
Due to a decrease in federal funding, the college cannot afford to replace the entire system at once. The college will
keep the existing course catalog database where all course information is maintained. This database is an Ingres
relational database running on a DEC VAX. Fortunately the college has invested in an open SQL interface that
allows access to this database from college’s Unix servers. The legacy system performance is rather poor, so the
new system must ensure that access to the data on the legacy system occurs in a timely manner. The new system
will access course information from the legacy database but will not update it. The registrar’s office will continue to
maintain course information through another system.
At the beginning of each semester, students may request a course catalogue containing a list of course offerings for
the semester. Information about each course, such as professor, department, and prerequisites, will be included to
help students make informed decisions.
The new system will allow students to select four course offerings for the coming semester. In addition, each
student will indicate two alternative choices in case the student cannot be assigned to a primary selection. Course
offerings will have a maximum of ten students and a minimum of three students. A course offering with fewer than
three students will be canceled. For each semester, there is a period of time that students can change their schedule.
Students must be able to access the system during this time to add or drop courses. Once the registration process is
completed for a student, the registration system sends information to the billing system so the student can be billed
for the semester. If a course fills up during the actual registration process, the student must be notified of the change
before submitting the schedule for processing.
At the end of the semester, the student will be able to access the system to view an electronic report card. Since
student grades are sensitive information, the system must employ extra security measures to prevent unauthorized
access.
Professors must be able to access the on-line system to indicate which courses they will be teaching. They will also
need to see which students signed up for their course offerings. In addition, the professors will be able to record the
grades for the students in each class.
Glossary
Introduction
This document is used to define terminology specific to the problem domain, explaining terms, which may
be unfamiliar to the reader of the use-case descriptions or other project documents. Often, this document
can be used as an informal data dictionary, capturing data definitions so that use-case descriptions and
other project documents can focus on what the system must do with the information.
Definitions
The glossary contains the working definitions for the key concepts in the Course Registration System.
Course
A class offered by the university.
Course Offering
A specific delivery of the course for a specific semester – you could run the same course in parallel
sessions in the semester. Includes the days of the week and times it is offered.
Course Catalog
The unabridged catalog of all courses offered by the university.
Faculty
All the professors teaching at the university.
Finance System
The system used for processing billing information.
Grade
The evaluation of a particular student for a particular course offering.
Professor
A person teaching classes at the university.
Report Card
All the grades for all courses taken by a student in a given semester.
Roster
All the students enrolled in a particular course offering.
Student
A person enrolled in classes at the university.
Schedule
The courses a student has selected for the current semester.
Transcript
The history of the grades for all courses, for a particular student sent to the finance system, which in turn
bills the students.
Supplementary Specification
Objectives
The purpose of this document is to define requirements of the Course Registration System. This
Supplementary Specification lists the requirements that are not readily captured in the use cases of the use-
case model. The Supplementary Specifications and the use-case model together capture a complete set of
requirements on the system.
Scope
This Supplementary Specification applies to the Course Registration System, which will be developed by
the OOAD students.
This specification defines the non-functional requirements of the system; such as reliability, usability,
performance, and supportability, as well as functional requirements that are common across a number of
use cases. (The functional requirements are defined in the Use Case Specifications.)
References
None.
Functionality
Multiple users must be able to perform their work concurrently.
If a course offering becomes full while a student is building a schedule including that offering, the student
must be notified.
Usability
The desktop user-interface shall be Windows 95/98 compliant.
Reliability
The system shall be available 24 hours a day 7 days a week, with no more than 10% down time.
Performance
The system shall support up to 2000 simultaneous users against the central database at any given time, and
up to 500 simultaneous users against the local servers at any one time.
The system shall provide access to the legacy course catalog database with no more than a 10 second
latency.
Note: Risk-based prototypes have found that the legacy course catalog database cannot meet our
performance needs without some creative use of mid-tier processing power
The system must be able to complete 80% of all transactions within 2 minutes.
Supportability
None.
Security
The system must prevent students from changing any schedules other than their own, and professors from
modifying assigned course offerings for other professors.
Only Professors can enter grades for students.
Only the Registrar is allowed to change any student information.
Design Constraints
The system shall integrate with an existing legacy system, the Course Catalog System, which is an RDBMS
database.
The system shall provide a Windows-based desktop interface.
Use-Case Model
Course Registration System Use-Case Model Main Diagram
Student
Register for Courses
Course Catalog
Login
Professor
Submit Grades
Close Registration
Billing Syst em
Close Registration
Brief Description
This use case allows a Registrar to close the registration process. Course offerings that do not have enough students
are cancelled. Course offerings must have a minimum of three students in them. The billing system is notified for
each student in each course offering that is not cancelled, so the student can be billed for the course offering.
Flow of Events
Basic Flow
This use case starts when the Registrar requests that the system close registration.
1. The system checks to see if registration is in progress. If it is, then a message is displayed to the Registrar, and
the use case terminates. The Close Registration processing cannot be performed if registration is in progress.
2. For each course offering, the system checks if a professor has signed up to teach the course offering and at least
three students have registered. If so, the system commits the course offering for each schedule that contains it.
3. For each schedule, the system “levels” the schedule: if the schedule does not have the maximum number of
primary courses selected, the system attempts to select alternates from the schedule’s list of alternates. The first
available alternate course offerings will be selected. If no alternates are available, then no substitution will be
made.
4. For each course offering, the system closes all course offerings. If the course offerings do not have at least
three students at this point (some may have been added as a result of leveling), then the system cancels the
course offering. The system cancels the course offering for each schedule that contains it.
5. The system calculates the tuition owed by each student for his current semester schedule and sends a transaction
to the Billing System. The Billing System will send the bill to the students, which will include a copy of their
final schedule.
Alternative Flows
Special Requirements
None.
Pre-Conditions
The Registrar must be logged onto the system in order for this use case to begin.
Post-Conditions
If the use case was successful, registration is now closed. If not, the system state remains unchanged.
Extension Points
None.
Login
Brief Description
This use case describes how a user logs into the Course Registration System.
Flow of Events
Basic Flow
This use case starts when the actor wishes to log into the Course Registration System.
1. The actor enters his/her name and password.
2. The system validates the entered name and password and logs the actor into the system.
Alternative Flows
Invalid Name/Password
If, in the Basic Flow, the actor enters an invalid name and/or password, the system displays an error
message. The actor can choose to either return to the beginning of the Basic Flow or cancel the login, at
which point the use case ends.
Special Requirements
None.
Pre-Conditions
The system is in the login state and has the login screen displayed.
Post-Conditions
If the use case was successful, the actor is now logged into the system. If not, the system state is unchanged.
Extension Points
None.
Flow of Events
Basic Flow
This use case starts when the Registrar wishes to add, change, and/or delete professor information in the system.
1. The system requests that the Registrar specify the function he/she would like to perform (either Add a
Professor, Update a Professor, or Delete a Professor)
2. Once the Registrar provides the requested information, one of the sub flows is executed.
If the Registrar selected “Add a Professor”, the Add a Professor subflow is executed.
If the Registrar selected “Update a Professor”, the Update a Professor subflow is executed.
If the Registrar selected “Delete a Professor”, the Delete a Professor subflow is executed.
Add a Professor
The system requests that the Registrar enter the professor information. This includes:
- name
- date of birth
- social security number
- status
- department
1. Once the Registrar provides the requested information, the system generates and assigns a unique id
number to the professor. The professor is added to the system.
2. The system provides the Registrar with the new professor id.
Update a Professor
1. The system requests that the Registrar enter the professor id.
2. The Registrar enters the professor id. The system retrieves and displays the professor information.
3. The Registrar makes the desired changes to the professor information. This includes any of the
information specified in the Add a Professor sub-flow.
4. Once the Registrar updates the necessary information, the system updates the professor record.
Delete a Professor
1. The system requests that the Registrar enter the professor id
2. The Registrar enters the professor id. The system retrieves and displays the professor information.
3. The system prompts the Registrar to confirm the deletion of the professor.
4. The Registrar verifies the deletion.
5. The system deletes the professor from the system.
Alternative Flows
Delete Cancelled
If, in the Delete A Professor sub-flow, the Registrar decides not to delete the professor, the delete is
cancelled, and the Basic Flow is re-started at the beginning.
Special Requirements
None.
Pre-Conditions
The Registrar must be logged onto the system before this use case begins.
Post-Conditions
If the use case was successful, the professor information is added, updated, or deleted from the system. Otherwise,
the system state is unchanged.
Extension Points
None.
Flow of Events
Basic Flow
This use case starts when the Registrar wishes to add, change, and/or delete student information in the system.
1. The system requests that the Registrar specify the function he/she would like to perform (either Add a Student,
Update a Student, or Delete a Student)
2. Once the Registrar provides the requested information, one of the sub flows is executed.
If the Registrar selected “Add a Student”, the Add a Student subflow is executed.
If the Registrar selected “Update a Student”, the Update a Student subflow is executed.
If the Registrar selected “Delete a Student”, the Delete a Student subflow is executed.
Add a Student
1. The system requests that the Registrar enter the student information. This includes:
- name
- date of birth
- social security number
- status
- graduation date
2. Once the Registrar provides the requested information, the system generates and assigns a unique id
number to the student. The student is added to the system.
3. The system provides the Registrar with the new student id.
Update a Student
1. The system requests that the Registrar enter the student id.
2. The Registrar enters the student id. The system retrieves and displays the student information.
3. The Registrar makes the desired changes to the student information. This includes any of the
information specified in the Add a Student sub-flow.
4. Once the Registrar updates the necessary information, the system updates the student information.
Delete a Student
1. The system requests that the Registrar enter the student id
2. The Registrar enters the student id. The system retrieves and displays the student information.
3. The system prompts the Registrar to confirm the deletion of the student.
4. The Registrar verifies the deletion.
5. The system deletes the student from the system.
Alternative Flows
Delete Cancelled
If, in the Delete A Student sub-flow, the Registrar decides not to delete the student, the delete is cancelled
and the Basic Flow is re-started at the beginning.
Special Requirements
None.
Pre-Conditions
The Registrar must be logged onto the system before this use case begins.
Post-Conditions
If the use case was successful, the student information is added, updated, or deleted from the system. Otherwise, the
system state is unchanged.
Extension Points
None.
Flow of Events
Basic Flow
This use case starts when a Student wishes to register for course offerings, or to change his/her existing course
schedule.
1. The Student provides the function to perform (one of the sub flows is executed):
If the Student selected “Create a Schedule”, the Create a Schedule subflow is executed.
If the Student selected “Update a Schedule”, the Update a Schedule subflow is executed.
If the Student selected “Delete a Schedule”, the Delete a Schedule subflow is executed.
Create a Schedule
1. The system retrieves a list of available course offerings from the Course Catalog System and displays
the list to the Student.
2. The Select Offerings subflow is executed.
3. The Submit Schedule subflow is executed.
Update a Schedule
1. The system retrieves and displays the Student’s current schedule (e.g., the schedule for the current
semester).
2. The system retrieves a list of available course offerings from the Course Catalog System and displays
the list to the Student.
3. The Student may update the course selections on the current selection by deleting and adding new
course offerings. The Student selects the course offerings to add from the list of available course
offerings. The Student also selects any course offerings to delete from the existing schedule.
4. Once the student has made his/her selections, the system updates the schedule for the Student using the
selected course offerings.
5. The Submit Schedule subflow is executed.
Delete a Schedule
1. The system retrieves and displays the Student’s current schedule (e.g., the schedule for the current
semester).
2. The system prompts the Student to confirm the deletion of the schedule.
3. The Student verifies the deletion.
4. The system deletes the Schedule. If the schedule contains “enrolled in” course offerings, the Student
must be removed from the course offering.
Select Offerings
The Student selects 4 primary course offerings and 2 alternate course offerings from the list of available
offerings.
Once the student has made his/her selections, the system creates a schedule for the Student containing the
selected course offerings.
Submit Schedule
For each selected course offering on the schedule not already marked as “enrolled in”, the system verifies
that the Student has the necessary prerequisites, that the course offering is open, and that there are no
schedule conflicts.
The system then adds the Student to the selected course offering. The course offering is marked as
“enrolled in” in the schedule.
The schedule is saved in the system.
Alternative Flows
Save a Schedule
At any point, the Student may choose to save a schedule rather than submitting it. If this occurs, the
Submit Schedule step is replaced with the following:
The course offerings not marked as “enrolled in” are marked as “selected” in the schedule.
The schedule is saved in the system.
No Schedule Found
If, in the Update a Schedule or Delete a Schedule sub-flows, the system is unable to retrieve the Student’s
schedule, an error message is displayed. The Student acknowledges the error, and the Basic Flow is re-
started at the beginning.
Delete Cancelled
If, in the Delete A Schedule sub-flow, the Student decides not to delete the schedule, the delete is
cancelled, and the Basic Flow is re-started at the beginning.
Special Requirements
None.
Pre-Conditions
The Student must be logged onto the system before this use case begins.
Post-Conditions
If the use case was successful, the student schedule is created, updated, or deleted. Otherwise, the system state is
unchanged.
Extension Points
None.
Flow of Events
Basic Flow
This use case starts when a Professor wishes to sign up to teach some course offerings for the upcoming semester.
1. The system retrieves and displays the list of course offerings the professor is eligible to teach for the current
semester. The system also retrieves and displays the list of courses the professor has previously selected to
teach.
2. The professor selects and/or de-selects the course offerings that he/she wishes to teach for the upcoming
semester.
3. The system removes the professor from teaching the de-selected course offerings.
4. The system verifies that the selected offerings do not conflict (i.e., have the same dates and times) with each
other or any course offerings that the professor has previously signed up to teach. If there is no conflict, the
system updates the course offering information for each offering the professor selects (i.e., records the professor
as the instructor for the course offering).
Alternative Flows
Schedule Conflict
If the systems find a schedule conflict when trying to establish the course offerings the Professor should
take, the system will display an error message indicating that a schedule conflict has occurred. The system
will also indicate which are the conflicting courses. The Professor can either resolve the schedule conflict
(i.e., by canceling his selection to teach one of the course offerings), or cancel the operation, in which case,
any selections will be lost, and the use case ends.
Special Requirements
None.
Pre-Conditions
The Professor must be logged onto the system before this use case begins.
Post-Conditions
If the use case was successful, the course offerings a Professor is scheduled to teach have been updated. Otherwise,
the system state is unchanged.
Extension Points
None.
Submit Grades
Brief Description
This use case allows a Professor to submit student grades for one or more classes completed in the previous
semester.
Flow of Events
Basic Flow
This use case starts when a Professor wishes to submit student grades for one or more classes completed in the
previous semester.
1. The system displays a list of course offerings the Professor taught in the previous semester.
2. The Professor selects a course offering.
3. The system retrieves a list of all students who were registered for the course offering. The system displays each
student and any grade that was previously assigned for the offering.
4. For each student on the list, the Professor enters a grade: A, B, C, D, F, or I. The system records the student’s
grade for the course offering. If the Professor wishes to skip a particular student, the grade information can be
left blank and filled in at a later time. The Professor may also change the grade for a student by entering a new
grade.
Alternative Flows
Special Requirements
None.
Pre-Conditions
The Professor must be logged onto the system before this use case begins.
Post-Conditions
If the use case was successful, student grades for a course offering are updated. Otherwise, the system state is
unchanged.
Extension Points
None.
Flow of Events
Basic Flow
This use case starts when a Student wishes to view his/her report card for the previously completed semester.
1. The system retrieves and displays the grade information for each of the course offerings the Student completed
during the previous semester.
2. When the Student indicates that he/she is done viewing the grades, the use case terminates.
Alternative Flows
Special Requirements
None.
Pre-Conditions
The Student must be logged onto the system before this use case begins.
Post-Conditions
The system state is unchanged by this use case.
Extension Points
None.
Version 2004
Problem Statement
As the head of Information Technology at Acme, Inc., you are tasked with building a new payroll system to replace
the existing system, which is hopelessly out of date. Acme needs a new system to allow employees to record
timecard information electronically and automatically generate paychecks based on the number of hours worked and
total amount of sales (for commissioned employees).
The new system will be state of the art and will have a Windows-based desktop interface to allow employees to
enter timecard information, enter purchase orders, change employee preferences (such as payment method), and
create various reports. The system will run on individual employee desktops throughout the entire company. For
reasons of security and auditing, employees can only access and edit their own timecards and purchase orders.
The system will retain information on all employees in the company (Acme currently has around 5,000 employees
world-wide). The system must pay each employee the correct amount, on time, by the method that they specify (see
possible payment methods described later). Acme, for cost reasons, does not want to replace one of their legacy
databases, the Project Management Database, which contains all information regarding projects and charge
numbers. The new system must work with the existing Project Management Database, which is a DB2 database
running on an IBM mainframe. The Payroll System will access, but not update, information stored in the Project
Management Database.
Some employees work by the hour, and they are paid an hourly rate. They submit timecards that record the date and
number of hours worked for a particular charge number. If someone works for more than 8 hours, Acme pays them
1.5 times their normal rate for those extra hours. Hourly workers are paid every Friday.
Some employees are paid a flat salary. Even though they are paid a flat salary, they submit timecards that record the
date and hours worked. This is so the system can keep track of the hours worked against particular charge numbers.
They are paid on the last working day of the month.
Some of the salaried employees also receive a commission based on their sales. They submit purchase orders that
reflect the date and amount of the sale. The commission rate is determined for each employee, and is one of 10%,
15%, 25%, or 35%.
One of the most requested features of the new system is employee reporting. Employees will be able to query the
system for number of hours worked, totals of all hours billed to a project (i.e., charge number), total pay received
year-to-date, remaining vacation time, etc.
Employees can choose their method of payment. They can have their paychecks mailed to the postal address of their
choice, or they can request direct deposit and have their paycheck deposited into a bank account of their choosing.
The employee may also choose to pick their paychecks up at the office.
The Payroll Administrator maintains employee information. The Payroll Administrator is responsible for adding
new employees, deleting employees and changing all employee information such as name, address, and payment
classification (hourly, salaried, commissioned), as well as running administrative reports.
The payroll application will run automatically every Friday and on the last working day of the month. It will pay the
appropriate employees on those days. The system will be told what date the employees are to be paid, so it will
generate payments for records from the last time the employee was paid to the specified date. The new system is
being designed so that the payroll will always be generated automatically, and there will be no need for any manual
intervention.
Glossary
Introduction
This document is used to define terminology specific to the problem domain, explaining terms, which may
be unfamiliar to the reader of the use-case descriptions or other project documents. Often, this document
can be used as an informal data dictionary, capturing data definitions so that use-case descriptions and
other project documents can focus on what the system must do with the information.
Definitions
The glossary contains the working definitions for the key concepts in the Payroll System.
Bank System
Any bank(s) to which direct deposit transactions are sent.
Employee
A person that works for the company that owns and operates the payroll system (Acme, Inc.)
Payroll Administrator
The person responsible for maintaining employees and employee information in the system.
System Clock
The internal system clock that keeps track of time. The internal clock will automatically run the payroll at
the appropriate times.
Pay Period
The amount of time over which an employee is paid.
Paycheck
A record of how much an employee was paid during a specified Pay Period.
Payment Method
How the employee is paid, either pick-up, mail, or direct deposit.
Timecard
A record of hours worked by the employee during a specified pay period.
Purchase Order
A record of a sale made by an employee.
Salaried Employee
An employee that receives a salary.
Commissioned Employee
An employee that receives a salary plus commissions.
Hourly Employee
An employee that is paid by the hour.
Supplementary Specification
Objectives
The purpose of this document is to define requirements of the Payroll System. This Supplementary
Specification lists the requirements that are not readily captured in the use cases of the use-case model. The
Supplementary Specifications and the use-case model together capture a complete set of requirements on
the system.
Scope
This Supplementary Specification applies to the Payroll System, which will be developed by the OOAD
students.
This specification defines the non-functional requirements of the system; such as reliability, usability,
performance, and supportability as well as functional requirements that are common across a number of use
cases. (The functional requirements are defined in the Use Case Specifications.).
References
None.
Functionality
None.
Usability
None.
Reliability
The main system must be running 98% of the time. It is imperative that the system be up and running
during the times the payroll is run (every Friday and the last working day of the month).
Performance
The system shall support up to 2000 simultaneous users against the central database at any given time, and
up to 500 simultaneous users against the local servers at any one time.
Supportability
None.
Security
The system should prevent employees from changing any timecards other than their own. Additionally, for
security reasons, only the Payroll Administrator is allowed to change any employee information with the
exception of the payment delivery method.
Design Constraints
The system shall integrate with an existing legacy system, the Project Management Database, which is a
DB2 database running on an IBM mainframe.
The system shall interface with existing bank systems via an electronic transaction interface (NOTE: THE
FORMAL INTERFACES WITH THE EXTERNAL BANK SYSTEM WOULD NEED TO BE DEFINED
EARLY IN THE PROCESS AND DEFINED HERE OR IN A SEPARATE SUPPORTING DOCUMENT.
SUCH A DEFINITION IS OUT OF THE SCOPE OF THIS COURSE.)
The system shall provide a Windows-based desktop interface.
Use-Case Model
Payroll System Use-Case Model Main Diagram
Flow of Events
Basic Flow
The use case begins when the Payroll Administrator requests that the system create an administrative report.
1. The system requests that the Payroll Administrator specify the following report criteria:
- Report Type (either total hours worked or pay year-to-date),
- Begin and end dates for the report,
- Employee name(s)
2. Once the Payroll Administrator provides the requested information, the system provides the Payroll
Administrator with a report satisfying the report criteria.
3. The Payroll Administrator may then request that the system save the report. At which time, the system requests
the Payroll Administrator to provide the name and location for saving the report.
4. Once the Payroll Administrator provides the requested information and confirms the decision to save the report,
the system saves the report to the specified name and location.
5. If the Payroll Administrator did not elect to save the report, the report is discarded.
Alternative Flows
Special Requirements
None.
Pre-Conditions
The Payroll Administrator must be logged onto the system in order for this use case to begin.
Post-Conditions
The system state is unchanged by this use case.
Extension Points
None.
Flow of Events
Basic Flow
This use case starts when the Employee wishes to create a “Total Hours Worked,” “Total Hours Worked for a
Project”, “Vacation/Sick Leave,” or “Total Pay Year-to-Date” report.
1. The system requests that the Employee specify the following report criteria:
- Report Type (either “Total Hours Worked,” “Total Hours Worked for a Project”, “Vacation/Sick Leave,” or
“Total Pay Year-to-Date”)
- Begin and end dates for the report
2. If the Employee selected the “Total Hours Worked for a Project” report, the system retrieves and displays a list
of the available charge numbers from the Project Management Database. The system then requests that the
Employee select a charge number.
3. Once the Employee provides the requested information, the system provides the Employee with a report
satisfying the report criteria.
4. The Employee may then request that the system save the report. At which time, the system requests the
Employee to provide the name and location for saving the report.
5. Once the Employee provides the requested information and confirms the decision to save the report, the system
saves the report to the specified name and location.
6. If the Employee did not elect to save the report, the report is discarded.
Alternative Flows
Special Requirements
None.
Pre-Conditions
The Employee must be logged onto the system before this use case begins.
Post-Conditions
The system state is unchanged by this use case.
Extension Points
None.
Login
Brief Description
This use case describes how a user logs into the Payroll System.
Flow of Events
Basic Flow
This use case starts when the actor wishes to Login to the Payroll System.
1. The actor enters his/her name and password.
2. The system validates the entered name and password and logs the actor into the system.
Alternative Flows
Invalid Name/Password
If, in the Basic Flow, the actor enters an invalid name and/or password, the system displays an error
message. The actor can choose to either return to the beginning of the Basic Flow or cancel the login, at
which point the use case ends.
Special Requirements
None.
Pre-Conditions
The system is in the login state and has the login screen displayed.
Post-Conditions
If the use case was successful, the actor is now logged into the system. If not, the system state is unchanged.
Extension Points
None.
Flow of Events
Basic Flow
This use case starts when the Payroll Administrator wishes to add, change, and/or delete employee information from
the system.
1. The system requests that the Payroll Administrator specify the function he/she would like to perform (either
Add an Employee, Update an Employee, or Delete an Employee)
2. Once the Payroll Administrator provides the requested information, one of the sub flows is executed.
If the Payroll Administrator selected “Add an Employee“, the Add an Employee subflow is executed.
If the Payroll Administrator selected “Update an Employee“, the Update an Employee subflow is executed.
If the Payroll Administrator selected “Delete an Employee“, the Delete an Employee subflow is executed.
Add an Employee
1. The system requests that the Payroll Administrator enter the employee information. This includes:
2. name
- employee type (hour, salaried, commissioned)
- mailing address
- social security number
- standard tax deductions
- other deductions (401k, medical)
- phone number
- hourly rate (for hourly employees)
- salary (for salaried and commissioned employees)
- commission rate (for commissioned employees)
- hour limit (some employees may not be able to work overtime)
3. Once the Payroll Administrator provides the requested information, the system generates and assigns a
unique employee id number to the employee and sets the paycheck delivery method to default of
“pickup”. The employee is added to the system.
4. The system provides the Payroll Administrator with the new employee id.
Update an Employee
1. The system requests that the Payroll Administrator enter the employee id.
2. The Payroll Administrator enters the employee id. The system retrieves and displays the employee
information.
3. The Payroll Administrator makes the desired changes to the employee information. This includes any
of the information specified in the Add an Employee sub-flow.
4. Once the Payroll Administrator updates the necessary information, the system updates the employee
record with the updated information.
Delete an Employee
1. The system requests that the Payroll Administrator specify the employee id.
2. The Payroll Administrator enters the employee id. The system retrieves and displays the employee
information.
3. The system prompts the Payroll Administrator to confirm the deletion of the employee.
4. The Payroll Administrator verifies the deletion.
5. The system marks the employee record for deletion. The next time the payroll is run, the system will
generate a final paycheck for the deleted employee and remove the employee from the system.
Alternative Flows
Delete Cancelled
If in the Delete An Employee sub-flow, the Payroll Administrator decides not to delete the employee, the
delete is cancelled and the Basic Flow is re-started at the beginning.
Special Requirements
None.
Pre-Conditions
The Payroll Administrator must be logged onto the system before this use case begins.
Post-Conditions
If the use case was successful, the employee information is added, updated, or deleted from the system. Otherwise,
the system state is unchanged.
Extension Points
None.
Flow of Events
Basic Flow
This use case starts when the Commissioned Employee wishes to add, change, and/or delete purchase order
information from the system.
1. The system requests that the Commissioned Employee specify the function he/she would like to perform (either
Create a Purchase Order, Update a Purchase Order, or Delete a Purchase Order)
2. Once the Commissioned Employee provides the requested information, one of the sub flows is executed.
If the Commissioned Employee selected “Create a Purchase Order “, the Create a Purchase Order subflow is
executed.
If the Commissioned Employee selected “Update a Purchase Order “, the Update a Purchase Order subflow is
executed.
If the Commissioned Employee selected “Delete a Purchase Order “, the Delete a Purchase Order subflow is
executed.
Alternative Flows
Delete Cancelled
If, in the Delete A Purchase Order sub-flow, the Commissioned Employee decides not to delete the
purchase order, the delete is cancelled and the Basic Flow is re-started at the beginning.
Special Requirements
None.
Pre-Conditions
The Commissioned Employee must be logged onto the system before this use case begins.
Post-Conditions
If the use case was successful, the purchase order information is added, updated, or deleted from the system.
Otherwise, the system state is unchanged.
Extension Points
None.
Maintain Timecard
Brief Description
This use case allows the Employee to update and submit timecard information. Hourly and salaried employees must
submit weekly timecards recording all hours worked that week and which projects the hours are billed to. An
Employee can only make changes to the timecard for the current pay period and before the timecard has been
submitted.
Flow of Events
Basic Flow
This use case starts when the Employee wishes to enter hours worked into his current timecard.
1. The system retrieves and displays the current timecard for the Employee. If a timecard does not exist for the
Employee for the current pay period, the system creates a new one. The start and end dates of the timecard are
set by the system and cannot be changed by the Employee.
2. The system retrieves and displays the list of available charge numbers from the Project Management Database.
3. The Employee selects the appropriate charge numbers and enters the hours worked for any desired date (within
the date range of the timecard).
4. Once the Employee has entered the information, the system saves the timecard.
Submit Timecard
1. At any time, the Employee may request that the system submit the timecard.
2. At that time, the system assigns the current date to the timecard as the submitted date and changes the
status of the timecard to “submitted.” No changes are permitted to the timecard once it has been
submitted.
3. The system validates the timecard by checking the number of hours worked against each charge
number. The total number of hours worked against all charge numbers must not exceed any limit
established for the Employee (for example, the Employee may not be allowed to work overtime).
4. The system retains the number of hours worked for each charge number in the timecard.
5. The system saves the timecard.
6. The system makes the timecard read-only, and no further changes are allowed once the timecard is
submitted.
Alternative Flows
Special Requirements
None.
Pre-Conditions
The Employee must be logged onto the system before this use case begins.
Post-Conditions
If the use case was successful, the Employee timecard information is saved to the system. Otherwise, the system
state is unchanged.
Extension Points
None.
Run Payroll
Brief Description
The use case describes how the payroll is run every Friday and the last working day of the month.
Flow of Events
Basic Flow
1. The use case begins when it’s time to run the payroll. The payroll is run automatically every Friday and the last
working day of the month.
2. The system retrieves all employees who should be paid on the current date.
3. The system calculates the pay using entered timecards, purchase orders, employee information (e.g., salary,
benefits, etc.) and all legal deductions.
4. If the payment delivery method is mail or pick-up, the system prints a paycheck.
5. If the payment delivery method is direct deposit, the system creates a bank transaction and sends it to the Bank
System for processing.
6. The use case ends when all employees receiving pay for the desired date have been processed.
Alternative Flows
Deleted Employees
After the payroll for an Employee has been processed, if the employee has been marked for deletion (see
the Maintain Employee use case), then the system will delete the employee.
Special Requirements
None.
Pre-Conditions
None.
Post-Conditions
Payments for each employee eligible to be paid on the current date have been processed.
Extension Points
None.
Flow of Events
Basic Flow
This use case starts when the Employee wishes to select a payment method.
1. The system requests that the Employee specify the payment method he would like (either: “pick up”, “mail”, or
“direct deposit”).
2. The Employee selects the desired payment method.
3. If the Employee selects the “pick-up” payment method, no additional information is required.
If the Employee selects the “mail” payment method, the system requests that the Employee specify the address
that the paycheck will be mailed to.
If the Employee selects the “direct deposit” method, the system requests that the Employee specify the bank
name and account number.
4. Once the Employee provides the requested information, the system updates the Employee information to reflect
the chosen payment method.
Alternative Flows
Special Requirements
None.
Pre-Conditions
The Employee must be logged onto the system before this use case begins.
Post-Conditions
If the use case was successful, the payment method for the Employee is updated in the system. Otherwise, the
system state is unchanged.
Extension Points
None.
Version 2004
In some sections of this document, the architecture is represented textually. The students, as part of the exercises
throughout the course, will generate the associated UML diagrams. Thus, for the UML representation of the
architecture, see the Payroll Exercise Solution.
Note: A SUBSET OF THE PAYROLL SYSTEM IS PROVIDED. Concentration is on the elements needed to
support the Login, Maintain Timecard and Run Payroll use cases.
Architectural Mechanisms
Analysis Mechanisms
Persistency: A means to make an element persistent (i.e., exist after the application that created it ceases to exist).
Distribution: A means to distribute an element across existing nodes of the system.
Note: For this course, it has been decided that the business logic will be distributed.
Security: A means to control access to an element.
Legacy Interface: A means to access a legacy system with an existing interface.
Analysis-to-Design-to-Implementation Mechanisms Map
Note: Remote Method Invocation (RMI) is a Java-specific mechanism that allows client objects to invoke operations
on server objects as though they were local. Native Java RMI comes with Sun's Java 1.1.
Implementation Mechanisms
Security
LoginForm
(from GUI Framework)
MainApplicationForm
(f ro m GUI Fra mework) + open()
+ enterUserName()
+ start() + validateUserIDPassword() : boolean
1 0..1
+ setupSecurityContext() + enterPassword()
+ displayAvailOperations() + logInUser()
1 + setupSecurityContext()
+ getUserContext() : ISecureUser
0..1
0..1
<<Interface>> 0..1 UserSecurityContext
ISecureUser (f rom Se curity Man ager)
(from Secure Interfaces)
+ setAccess (toData : SecureData, ac cess : Sec urityAcc ess)
+ setAccess(toData : ISecureData, access : SecurityAccess) + getAccess (toData : SecureData) : SecurityAcces s
+ getAccess(toData : ISecureData) : SecurityAccess + getUserId() : UniqueId
+ getUserId() : UniqueId + UserSecurityContext(userId : UniqueId)
+ new(forUser : UserID) + checkInternalTables()
<<Interface>>
Security Acc ess
ISecureData
(from Secure Interfaces)
(from Secure Interfaces)
+ isReadable() : Boolean
+ getUniqueId() : UniqueId
+ isWriteable() : Boolean
+ isDeleteable() : Boolean
UniqueId + makeReadable()
(from Secure Interfaces) + makeWriteable()
<<role>> + makeDeleteable()
SampleSecureClass + generat e() : UniqueId + new()
+ asSt ring() : String
+ getUniqueID() + UniqueId(value : String)
Class Descriptions
ISecureData : Analysis Mechanisms:
- Security
SampleSecureClass :
Requirements Traceability:
- Usability: The desktop user-interface shall be Windows 95/98 compliant.
1. start( )
1.1. open( )
2. enterUserName( )
We did not expand on
3. enterPas sword( ) validation since it was a
reverse engineered
4. logInUser( ) component
4.1. validateUserIDPassword( )
[ login s uccessful ]
4.2. setupSecurityContext( )
4.2.1. new(UserID)
The
5. setupSecurityContext( ) MainApplicationForm
retains the secure
Display the 5.1. getUserContext( ) user context for later
operations/functions processing by the
that the application user.
provides. 6. close( )
7. displayAvailOperations( )
Secure : :
Clien SecurityAcce
AND/O
4.
For JDBC, a client will work with a DBClass to read and write persistent data.
The DBClass is responsible for accesing the JDBC database using the
DriverManager class. Once a database connection is opened, the DBClass
can then create SQL statements that will be sent to the underlying RDBMS
and executed using the Statement class. The results of the SQL query is
returned in a ResultSet class object.
<<role>>
PersistentClassList
(from SamplePersistentClass)
<<role>>
PersistencyClient
(from SamplePersistency Client) + new()
+ add(c : PersistentClass)
1
0..*
<<role>>
<<role>>
PersistentClass
DBClass
(from SamplePersistentClass)
DriverManager
1 (from java.sql)
Connection
(from java.sql) + getConnection()
+ createSt atement ()
Statement
(from java.sql)
+ executeQuery()
Result Set
(from java.sql)
+ executeUpdate()
+ get String()
Class Descriptions
PersistencyClient : An example of a client of a persistent class.
PersistentClassList :
Statement : The class used for executing a static SQL statement and obtaining the results produced by it.
SQL statements without parameters are normally executed using Statement objects.
DBClass : A sample of a class that would be responsible for making another class persistent.
Every Class that's persistent will have a corresponding DBClass (e.g., Student will have a DBStudent
class).
With an RDBMS, you need a mapping of objects/classes to tables, and you must recreate the
(association/aggregation) structures. DBClass is a database interface class which understands the OO-to-
RDBMS mapping and has the behavior to interface with the RDBMS. This database interface class is used
whenever a persistent class needs to be created, accessed, or deleted. The database interface class flattens
the object and writes it to the RDBMS and reads the object data from the RDBMS and builds the object.
Connection : A connection (session) with a specific database. Within the context of a Connection, SQL
statements are executed, and results are returned.
ResultSet : A ResultSet provides access to a table of data. A ResultSet object is usually generated by
executing a Statement.
JDBC RDBMS
1.2. createStatement(
execute SQL
statement
1.3.
To update a class, the client asks the DBClass to update. The DBClass retriev
from the existing PersistentClass object, and creates a new Statement using
connection class createStatement() operation. Once the Statement is built, the
executed, and the database is updated with the new data from the
1. create( )
1.1. new( )
1.2. getData( )
1.3. createStatement( )
1.4. executeUpdate(string)
To create a new class, the client asks the DBClass to create the new class. The
DBClass creates a new instance of Persistent Class with default values. The
DBClass then creates a new Statement using the Connection class
createStatement() operation. The statement is executed and the data is inserted
into the database.
1. delete(PersistentClass)
: DBClass :
DriverManager
Parameters:
url - A database url of the form jdbc:subprotocol:subname
user - The database user on whose behalf the Connection
is being made
password - The user's password
You define the Persistent Class for persis tent use the same way you
define it for transient use. Ot her than t he required import com.odi.*
statement, there is almost no special code for pers ist ent use of the
Persis tent Class.
Class Descriptions
PersistencyClient : An example of a client of a persistent class.
<<role>>
SampleDBManager
+ initialize()
+ command()
+ shutdown()
+ newPersistentClass() : PersistentClass
1
+ removePersistentClass(theClass : PersistentClass)
+ getPersistentClassData() : PersistentClass
Session
1 Object St ore
(from com.odi)
1 1 1 (from com.odi)
1
1
+ create()
+ destroy(object : Object)
+ join()
+ terminate() 0..*
1 Transaction
Map (from com.odi)
(f ro m c om.od i)
+ begin()
+ put(name : string, object : Object) + commit(retain : int)
+ get(name : string) : Object
+ remove(name : string) 1
+ new()
Database
(from com.odi)
Class Descriptions
Session : The class that represents a database session. A session must be created in order to access the
database and any persistent data.
A session is the context in which PSE/PSE Pro databases are created or opened, and transactions can be
executed. Only one transaction at a time can exist in a session.
Before you begin creating persistent objects, you must create a database to hold the objects. In subsequent
processes, you open the database to allow the process to read or modify the objects. To create a database,
you call the static create() method on the Database class and specify the database name and an access
mode.
Transaction : An ObjectStore transaction. Manages a logical unit of work. All persistent objects must be
accessed within a transaction.
ObjectStore : Defines system-level operations that are not specific to any database.
: : : Transaction : DatabaseRoot :
PersistencyClient SampleDBManager PersistentClass Map
1. newPersistentClass( )
1.1. begin( ) constructor
call
The root is
1.2. new( ) the entry
point into the
Database.
1.3. put(string, Object)
1.4. commit(int)
Pass in the unique key for the
PersistentClass and the
PersistentClass.
The PersistentClass will be stored in
the Map, and subsequently, in the
ObjectStore Database.
To delete an object from the database, the SampleDBManager first creates a new transaction,
removes any constituent parts, and then removes the object using the database root "remove()"
operation. The object is then completely removed from the ObjectStore database immediately via
ObjectStore.destry (). Once the object has been removed, the transaction is committed.
Thus, in ObjectStore, delete really has two steps -- removal from the container class that is the
database in memory, and removal from the physical database. that is because you want the deletion
to occur right away, as opposed to being cached.
: : : Transaction : DatabaseRoot :
PersistencyClient SampleDBManager PersistentClass Map
The root is
1. getPersistentClassData( ) the entry
Find the object in point int o t he
1.1. begin( )
the database; pass Databas e.
in the unique key
St art a read-only
t ransaction to ensure
t hat t he object isn't 1.2. get(string)
c hanged while we're
reading it
1.3. getData(String)
1.4. commit(RETAIN_HOLLOW)
Read the dat a from
returned object
Specify the object
RETAIN_HOLLOW option
on the commit(), so that the
references to the retrieved
data can be used outside of
the transaction.
To read an object , the SampleDBManager first creates a new read-only transaction then looks
up the object using the Map "get()" operation. Once the object has been found it can be read with
the "getData()" operation, and the transaction committed. RETAIN_HOLLOW is specified for the
commit,. so the references to the object and the retrieved data can be used outside of the
retrieval transaction. Once the transaction is committed the object can then be updated.
Note: Even though RETAIN_HOLLOW is specified, it does not guarantee the integrity of the
reference outside of the transaction. There is still some risk that the reference could be outdated.
RETAIN_HOLLOW basically says "I'm consciously taking such a risk". If that option was not
used, then the references would not be available.
: : : Transaction DatabaseRoot : :
PersistencyClient SampleDBManager Map PersistentClass
1.4. commit
1. initializ e( )
1.1. create( )
The root is the entry point into the
Database. It is a "special" data
1.2. join( ) structure. Any changes to this
data structure that occur within the
context of a transaction will be
applied to the associated
1.3. create( ) ObjectStore Database.
1.4. begin( )
Pass in the
name of the
Map, as well 1.5. new( )
as the Map
itself (the map 1.6. createRoot(string, Object) Create the Map that will
is an Object). serve as the database
root.
1.7. commit ()
Once the session has been c reated and joined, t he SampleDBManager must open and create the new
database.
To create the database, the SampleDB Manager creates a new transac tion and creates the "root" of t he
database with the "createRoot()" operation.
The root is the entry point into the Database (the root class is the top-level class in t he object databas e).
It is a "special" data st ructure (in the above example, a Map that contains instanc es of the root class and
all “reachable” c lasses). Any changes to this data struct ure that occur within t he c ontext of a trans action
will be applied to the associated ObjectStore Database. There may be multiple database root s.
1. shutdown( )
1.1. c lose( )
1.2. terminate( )
Distribution - RMI
Class Descriptions
Naming. :
* This is the bootstrap mechanism for obtaining references to remote
* objects based on Uniform Resource Locator (URL) syntax. The URL
* for a remote object is specified using the usual host, port and
* name:
*<br> rmi://host:port/name
*<br> host = host name of registry (defaults to current host)
*<br> port = port number of registry (defaults to the registry port number)
*<br> name = name for remote object
Remote :
* The Remote interface serves to identify all remote objects.
* Any object that is a remote object must directly or indirectly implement
* this interface. Only those methods specified in a remote interface are
* available remotely. <p>
* Implementation classes can implement any number of remote interfaces
* and can extend other remote implementation classes.
For all classes that realize the Remote interface, a remote stub and a remote skeleton are created. These
classes handle the communication that must occur to support distribution.
UnicastRemoteObject :
Serializable : Any Java class that you want to pass as an argument to an operation on a remote interface
must realize the Serializable interface.
2. doSomething
2.1. doSomething
: : Naming. : :
SampleDistributedClassClient ISampleDist ributedClassInt erface SampleDistributedClass
2. doSomething
2.1. doSomething
Logical View
Architectural Analysis
Upper-Level Layers
- Application layer
- Business Services layer
Upper-Level Layer Dependencies
- The Application layer depends on the Business Services layer
Architectural Design
Incorporating ObjectStore
For the Payroll System, a single root class has been chosen -- Employee.
The selected container is the Map, where the unique key to access the Employees is EmployeeID.
There is one DBManager class per ObjectStore database instance. For the Payroll System, there is one ObjectStore
database, the Payroll Database, that contains employee information, including timecard, purchase order, and
paycheck information. Thus, there is one PayrollDBManager that exists in the new OODBMS Support package.
For the ObjectStore persistency mechanism, the DBManager class includes operations to access the OODBMS
persistent entities in the database. For the PayrollDBManager class, operations have been added to access
Employee, Timecard, Purchase Order, and Paycheck information since that is required for the core system
functionality.
During Identify Design Mechanisms, the architect provides guidance to the designers and makes sure that the
architecture has the necessary infrastructure to support the mechanism. Thus, the PayrollDBManager and the
supporting architectural packages and relationships (OODBMS Support) have been defined in Identify Design
Mechanisms. However, the development of the interaction diagrams that describe these operations and where they
fit into the existing use-case realizations has been deferred until detailed design (e.g., Use-Case and Subsystem
Design).
The following diagram demonstrates the operations that have been defined for the PayrollDBManager during
Identify Design Mechanisms:
<<layer>>
Application
<<layer>>
Business
Services
<<layer>>
Middleware
Base Reuse
global
Layer Descriptions
Business Services Layer: The Business Services layer contains business-specific elements that are used in
several applications.
Administration Employee
Payroll
(from Application) Activities
(from Application)
(from Application)
<<subsystem>>
BankSystem
(from Business Services)
<<subsystem>>
PrintService
(from Business Services)
<<subsystem>>
ProjectManagementData
External System b ase
Interfaces (from Business Services)
(from Business Services)
Payroll Artifacts
(from Business Services)
GUI Framework
(from Security)
Security
(from Business Services)
<<subsystem>>
Secure When the RDBMS
Security Manager
Interfaces mechanism is incorporated,
(from Security) the dependency to java.sql
(from Security)
will be added
com.odi java.sql
java.rmi java.awt (from Middleware) (from Middleware)
(from (from Middleware)
Middl )
Base Reuse
java.lang
global (from Middleware)
Package Descriptions
Employee Activities : Contains the design elements that support the Employee's applications.
Administration : Contains the design elements that support the Payroll Administrator's applications.
Payroll : Contains the design elements that support the execution of the payroll processing.
External System Interfaces : Contains the interfaces that support access to external systems. This is so
that the external system interface classes can be version controlled independently from the subsystems that
realize them.
java.awt : The java.awt package contains the basic GUI design elements for java.
com.odi : The com.odi package contains the design elements that support the OODBMS persistency
mechanism. The name of the package in the model reflects the naming convention for 3rd party Java
software. The convention is to use the reverse of the domain name, so if Rational had a Java package called
"util" they’d call it "com.rational.util". This com.odi has nothing to do with Microsoft COM/DCOM; they
are totally separate. There is nothing COM/DCOM related when using CORBA, RMI, or ObjectStore.
GUI Framework : This package comprises a whole framework for user interface management.
It has a ViewHandler that manages the opening and closing of windows, plus window-to-window
communication so that windows do not need to depend directly upon each other.
This framework is security-aware, it has a login window that will create a server-resident user context
object. The ViewHandler class manages a handle to the user context object.
The ViewHandler also starts up the controller classes for each use case manager.
Secure Interfaces : Contains the interfaces that provide clients access to security services.
Security Manager Subsystem: Provides the implementation for the core security services.
ObjectStore Support : Contains the business-specific design elements that support the OODBMS
persistency mechanism. This includes the DBManager. The DBManager class must contain operations for
every OODBMS persistent class.
java.rmi : The java.rmi package contains the classes that implement the RMI distribution mechanism. This
package is commercially available with most standard JAVA IDEs.
java.sql : The package that contains the design elements that support RDBMS persistency.
Process View
Processes
The processes for the Payroll System will be the following:
To further improve throughput and turnaround, a Bank Transaction thread was defined to allow multiple accesses to
the Bank System to occur concurrently. Each time a transaction needs to be sent to the Bank System, a different
thread is used. The Bank Transaction thread will run in the context of the Bank System Access process.
In general, the above processes and threads were defined to support faster response times and take advantage of
multiple processors.
Design Element to Process Mapping
- The classes associated with the individual user interfaces should be mapped to those processes.
- The classes associated with the individual business services should be mapped to those processes.
- The classes associated with access to the external systems should be mapped to those processes.
Deployment View
Nodes and Connections
The nodes of the physical architecture for the Payroll System are the following:
- Desktop PCs (processors)
- Payroll Server (processor)
- Bank System (processor)
- Project Management Database (processor)
- Printers (devices)
- The Desktop PCs are connected to the Payroll Server via the Company LAN
- The Printers are connected to the Payroll Server via the Company LAN
- The Payroll Server is connected to the external Bank System via the Internet.
- The Payroll Server is connected to the ProjectManagementDatabase via the Company LAN
Process-to-Node Map
The following processes run on the Desktop PCs:
- EmployeeApplication