CIS 264 C++ Programming for Engineers

Program Requirements: Roman Numeral Class

Roman numerals are not a data type provided by C++ compiler, so to work with them we must implement our own ADT .

Create a new data type roman using the class feature in C++.

Allow input, output and basic math and relational operations on this new data type. Conversion routines to and from strings and those newfangled Arabic numerals should be included. Create a separate class library for roman.

Create a test program to demonstrate all of the features of the class.

All roman numbers are written from seven basic numerals. These are:
I - 1
V - 5
X - 10
L - 50
C - 100
D - 500
M - 1000
There is no zero. All other numbers are written by combining these seven symbols.

Roman numerals are written from left to right, using the principle of addition. A person first writes the thousands, then the hundreds, then the tens, and finally the units. Thus to write the number 2,763, a person first writes MM (2,000), then DCC (500+200=700), next LX (50+10=60) and finally III (3).
The number 2,763 appears as MMDCCLXIII

All 4's and 9's use the principle of subtraction. Thus 4 is written as IV, or 5 minus 1, and 9 is written as IX, or 10 minus 1. The same principle applies to any number that begins with a 4 or 9, such as 40=XL, 90=XC, 400=CD, 900=CM. In Roman numerals, a smaller numeral appearing before a larger numeral indicates that the smaller numeral is subtracted from the larger one.
[From: World Book Encyclopedia]

Also See: http://en.wikipedia.org/wiki/Roman_numerals

Use functional decomposition to create a code design.   No GLOBAL Variables are allowed!

 Following the guidelines discussed in class, construct a test set for the program.

Final Program Includes:

Problem Description
Algorithm
ADT Specification (Annotated class specification file)
Test Set Design
Source Code
   Class Specification
   Class Implementation
   Test Program
Sample Output