Our factory creates Widgets and stores them in our warehouse. From time to time we need to ship these Widgets to our customers. A shipping specialist is in need of a program to assist with creation of the shipments. Please write a program for the shipping specialist that allows the specialist two options for creating shipments.
One of the features the program needs to have is to allow the specialist to sort the Widgets by date or by color to assist the specialist with shipment creation. One of the constraints on shipment creation is that a shipment can hold a maximum of 10 Widgets.
We require unit tests to be created.
Widget has serial number, color & production date as an attribute.
Example:
SN | Color | Production Date |
---|---|---|
1 | Red | 1/1/2006 |
2 | Blue | 2/1/2007 |
3 | Red | 3/1/2006 |
4 | Green | 4/1/2009 |
5 | Green | 5/1/2011 |
Sample Widget List is provided in WidgetUtils class.