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:
Here is the code I attempted to write.
void store the number
//Function to store the Roman numerals
void convert and store the number to decimal
//Function convert number to decimal
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.