PHP programming task for candidates
I'm trying to assess some candidates' PHP ability, specifically some OO understanding and something applicable to the application we're writing.
I'll also throw in some multiple choice technical stuff, but I like to give them a coding task.
For the actual coding I've come up with the following. Does it make sense? Is it suitably taxing but not too much and not going to take them a week? I only want them to spend a couple of hours tops on it. I've been working on this system exclusively for so long I can't be objective about other people's understanding of it.
Consider a system with the following behaviour:
Products are listed on the web site. Each product may be sourced from a different supplier.
A customer places an order consisting of one or more products.
For the products on the order each distinct product supplier needs to receive a purchase order for those products they supply (eg products 1 and 3 order supplied by supplier A, product 2 is supplied by supplier B etc). This represents us buying the products from the supplier, and instructs them to dispatch the products.
Define a suitable class diagram representing these element.
Provide code for appropriate class methods for the following operations:
Sending the customer confirmation of the details of their order via email
Sending the products' suppliers details of the purchase order
What do you reckon?