CIS 264 C++ Programming for Engineers

Program Requirements: Caesar's Census

Caesar has decreed that a census be taken. He has also decided that the results should be tabulated using the latest technology available: Census Meister MMVIII for Windows® XP. There is only one catch... it hasn’t been written yet. That fact has not slowed the marketing department one bit, in fact, they have already sold the product. It is up to you to write this software system, and to save your job... and our necks.

Input has been collected from the various provinces and consists of a text file containing the name of the province followed by the number of citizens (freemen) and slaves.

SAMPLE INPUT FILE:

Gaul MCXVII    MMMCMCCXXI
Britannia CMDLVII  MMCMDCCLXVI
Rome MMMDCCXXV MMMMCMXXXVII
Pompeii IV XVI
Sicilia DCCXIV MDCLXVI

Input will come from an ASCII text file. Output should either be directed to the screen or to a file of the users choosing. 

Output should include appropriate headings, listing the provinces in descending order by total population, and totaling the number of citizens, slaves and a grand total.

Unfortunately the census bureau computers don’t recognize Roman Numerals! (Although in Rome they probably just called them numbers) Create a new data type roman using the class feature in C++. Overload the appropriate operators to allow input, output and basic math and relational operations on this new data type. Conversion routines to and from those newfangled Arabic numerals should be included as well. Create a separate class library for roman.

Hints:

Still struggling with Roman Numerals? Perhaps this explanation will help http://www.gwydir.demon.co.uk/jo/roman/number.htm

This is actually two separate projects: a roman numeral class, and a straightforward file processing program.

If the file processing program is coded first, using typedef roman int; will allow the entire program to be coded and tested separately from the roman class. (With a modified sample data file, of course.)

Use functional decomposition and modular programming techniques to divide the problem into appropriate functions. 

NO GLOBAL variables are allowed!

Project Deliverables:

Final Program: (All components in Presentation Format )
Algorithm for main
Algorithm for any functions
Test Set Design
Source Code
Sample Output
Actual Output from instructor provided data set