The "PAYROLL" Project. (Almost true story.) Instructor Jeff Zhuk

User Requirements

Use Cases

Classes

Complete Source

Back To Object-Oriented Technology

The "Unbelievable Holes" factory board of directors has decided to improve bagel holes production by introducing a drastic change. The first time ever each employee would receive a real paycheck for the job.

Hourly worker paycheck would depend on the amount of hours worked. (One of the directors proposed to hire independent consultants to count bagel holes produced, but it was voted out as it could insult some workers).

All of the managers would receive their salary anyway. (No objections).

The major discussion was about marketing and sales people. It has been confirmed again that bagel holes are extremely hard to sell. Therefore, salespeople would be paid hourly plus commissions to stimulate hard work.

The "PAYROLL" Project started with the motto: "Each Employee should be accountable".


Capture User Requirements into a set of Use Cases

User Requirements can be captured into a set of "Use Cases".
It's a kind of Process Diagram where each Use Case describes some scenario.

Back to PAYROLL Overview

Object Analysis Illustration

To recognize classes we are looking for repeatable (reusable) set of objects.

Here is an example of class hierarchy for a PAYROLL system.

Employee is a base class.
All other classes are derived (inherited or extended) from the Employee.
For example, Sales Person inherited from Hourly with all the Employee features

Object Model Diagram covers static side of the design, while Process Diagram shows its dynamic side.

"The world is a process that never stops" (Heraclitus, Dynamic view of the world)
"The world is a composition of objects called atoms" (Democritus, Object Oriented philosopher)
"Object Oriented approach is better helping us organize the inherit complexity of software systems"
(Booch, OO Analysis with Applications)
"If your Object Model's bad - fix it, don't blame my dad!" (Ben Zhuk, yet another OO Philosopher)

Back to PAYROLL Overview