A restaurant ordering system accepts food orders one item at a time. Each item entered is for a specific person sitting at a particular table.
The kitchen is not concerned with which person ordered which item. They just need to know what menu items have been ordered for each table.
Write a program that will read a list of individual orders and "pivot" that set into a display of food items for each table in the diner. The total number of each item per table will be displayed on a column for that food item.
For example, the orders:
Would be displayed for the kitchen as:
Table,Cappuccino,Club Sandwich,Green Salad,Sparkling Water
Note that the menu items are listed in alphabetical order across the overall list.
A comma-delimited list of names, table numbers, and menu items.
A comma-delimited list of table numbers and item counts with a header row as the first line. The first column name is "Table".