Ballot as Composite


Implement a ballot for the online voting system. Use the composite design pattern. Remember to make the proper factories for component objects, and make the factories singletons.

Make the ballot fit the requirements of the online voting system (particularly the need to allow multi-level elections), but use the simplifications below to take away some of the complexity.