AP Assignment After IV - Scenario Form
AP Assignment After IV - Scenario Form
The factory has a name, address, invoice value and products. Each product
consists of id, name and price.
The factory has several types of employees in the factory in which they all
share a name, id, email, salary and phone. The manager has department in
which he/she works in, office number and project name in which he/she is
responsible for. The workers have a position, shift and a flag that defines if the
worker is a team leader or not. The accountant has a level and a list of
responsibilities.
A client has id, name, address and purchase order. The purchase order has
client linked to it, id, invoice value and products. The purchase order must
have an option to add products to the purchase which will increase the invoice
value based on the products’ price.
Both the factory and client should have a pay option that will pay the invoice
value. All the employees should have an option to get their salaries based on
their profession as follow:
Manager salary = base salary + 25% of the base salary
Worker salary = base salary + 5% of the base salary
Accountant salary = base salary + 10% of the base salary
Task 2
i) Create a detailed UML class diagram for the factory system using a suitable
UML tool. The classes should include attributes and methods.
ii) Explain one inheritance and one composition relationships existed in your
UML.
Task 3
i) Implement the system using a suitable object oriented language. Provide
screen shots (in addition to source code) as evidence of program execution.
Task 4
i) LLH has a HR system and they want to integrate it with your new developed
system. The main problem is that they do not have any documentation. You
need to extract the UML class diagram from the already existed code to able to
do the task. Investigate how we can create a tool to extract the UML
automatically from the given code in details.
Task 5
i) There are three categories of design patterns which are creational, behavioural and
structural. Given the list below that has design patterns examples. Sort them into
the three categories and explain your choices.
a. Singleton Pattern
b. Facade Pattern
c. Observer Pattern
d. Decorator Pattern
e. Factory Pattern
f. Strategy Pattern
Recommended Resources
Please note that the resources listed are examples for you to use as a starting
point in your research – the list is not definitive.
Textbooks
Learning Outcomes and Assessment Criteria
P3 Build an application M3 Develop code that D3 Evaluate the use of design patterns
derived from UML class implements a design for the given purpose specified in M3.
diagrams. pattern for a given purpose.