Groovy Project Course material and Resources
You can use either Groovy or Java.
Design a routine that will calculate the average Product price per Group.
The Price of each Product is calculated as: Cost * (1 + Margin)
Assume there can be a large number of products and a large number of categories.
Plus points:
- use Groovy and its closures
- make the category look-up performance effective
- use method Collection.inject
contains information about [Product, Group, Cost]