Reputation: 67
I have a scenario for which I have to design a use case diagram, activity diagram and a class diagram:
“I run a small computer consultancy firm with a number of employees. Along with the basic information about the employees (name, DoB, contact details, etc.) I need to be able to keep track of what type of role they perform, such as Hardware Technician, Programmer, and Software Installer. A single employee can perform multiple roles, and each role has an associated hourly pay. I need to keep name and contact details of all customers that have a contract with us. A customer can have multiple contracts at the same time, but each contract is only associated with one customer. Each contract has a name, a description, a creation date, and a job type – e.g. System Development, Software Upgrade. No details of job types need to be captured other than their name. Each contract also has a single employee designated as the project leader. One employee may be the project leader of multiple contracts.”
I have tried to draw a use case diagram and I want to know if I have drawn it correct and if there are any mistakes or any improvements that should be made:
Upvotes: 1
Views: 315
Reputation: 73530
Let's analyse your requirements, to identify use cases:
Manage employee
I run a small computer consultancy firm with a number of employees. Along with the basic information about the employees (name, DoB, contact details, etc.) I need to be able to keep track of what type of role they perform, such as Hardware Technician, Programmer, and Software Installer. A single employee can perform multiple roles, and each role has an associated hourly pay.
Manage customer data (may be included in contract management)
I need to keep name and contact details of all customers that have a contract with us.
Manage contracts
A customer can have multiple contracts at the same time, but each contract is only associated with one customer. Each contract has a name, a description, a creation date, and a job type – e.g. System Development, Software Upgrade. No details of job types need to be captured other than their name.
Assign project leaders (may be included in contract management)
Each contract also has a single employee designated as the project leader. One employee may be the project leader of multiple contracts.”
Now, more use case may be hidden behind these sentence and could be deduced. However, let's see critically if the additional ones you've identified fit.
The following seem ok at first sight:
The following use case are questionable:
Finally, some of these requirements go beyond the (goal oriented) use case, and describe the class model. Don't get trapped by this: the use case should focus on the actor interaction with the system.
Upvotes: 0