You are on page 1of 3

Work test for Software

Developer
– Shopping Cart –
Before you start with this exercise please read carefully the document completely (2
pages).

Background
A new shopping cart system is to be realized for an online shop. The new feature to
add to the existing system is that discounts can be displayed in the future on the
shopping cart.

The following business rules are formulated for the discounts:


1. A discount can be defined as absolute discount or percentage discount
2. A discount can be defined for a specific product
3. A discount can be defined for a product group (in the application all items of
the same product group will be considered to apply the discount)
4. A discount can be applied to the entire shopping cart depending on the
customer group
5. When applying the discounts, the defined rules are applied to products,
product groups and the shopping cart depending on each other (calculation of
the total value of the shopping cart considering all discount types)

The following features are required in addition to mapping the business rules:
 Adding products in the shopping cart
 Calculating the value of the shopping cart taking into account the defined
discounts

A mapping of the remaining functionality of the online shop is only required as to


implement the requirements described above

Problem definition
 Develop the shopping cart system according to the requirements described
above in the section entitled “Background”
 Make your solution elegant and easy to understand using natural terminology
 Show that in addition to PHP basics, you also master the PHP standard APIs,
concepts of object-oriented programming, and the principles of Clean Code
development
 Demonstrate the correct functionality of your solution through meaningful unit
tests
 Make your solution available as a ZIP
For an acceptable solution, at least the following criteria must be met:
 Implementation of business rules 1, 2 and 4; the latter without dependency on
the customer group
 Simple concepts of object-oriented programming (e.g. class division,
responsibilities, exception handling) were used meaningfully

For a good solution, the following additional criteria must be fulfilled:


 Implementation of business rule 3, full implementation of the business rule 4
 A clear recognizable use of the principles of Clean Code development
 Meaningful logging via the console

For an excellent solution, the following additional criteria must be fulfilled:


 Implementation of business rule 5
 Advanced concepts of object-oriented programming, e.g. the meaningful use of
suitable design patterns have been applied

Conditions
 For this work test are max. 4 hours envisaged
 If you consider it appropriate (or the task explicitly requires it), you can use
open source libraries

You do not have to implement any user interface, just only the functions to manage
the data and relations.

… and now have fun! 

You might also like