0

Hi,
I'm taking an online C++ class and having some difficulty understanding the assignments. Can someone please look at the code I wrote to ensure validity? I am not asking for the answer just some guidance, I’m totally lost.
The assignment is as follow:
Write a prg to convert numbers entered in Roman Numeral to decimal. Your prg should consist of a class, say romanType. An object of the type romanType should do the following:

a. Store the number as a Roman numeral
b. Convert and store the number into decimal
c. Print the number as Roman numeral or decimal number as requested by the user.

The decimals values of the Roman numerals are:
M 1000
D 500
C 100
L 50
X 10
V 5
I 1

Here is the code I attempted to write.
Romantodecimal
{
public:
void store the number
//Function to store the Roman numerals
//Postcondition:
void convert and store the number to decimal
//Function convert number to decimal
//Postcondition:
void printNumber () const;
//Function to print the number after user input
//Postcondition: The number is printed as
M = 1000
D = 500
C = 100
L = 50
X = 10
V = 5
I = 1
};

I know this need lots of correction, so I'm open for the help.

Thanx

3
Contributors
2
Replies
3
Views
12 Years
Discussion Span
Last Post by jwenting
0

and actually write some code...
Just putting a few {s and }s and a void or two into your assignment doesn't constitute an effort...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.