- 注册
- 2008-03-05
- 消息
- 102
- 荣誉分数
- 31
- 声望点数
- 0
Write a class (ROMANNUMERAL) which has as its data member a pointer to a char
(char * romanNumeral_ptr) which will (eventually) hold a roman numeral. The
ONLY data member will be this one. You must write the following methods:
• Default constructor
• Initial constructors which allow a char array as input or an int number. In each of these
constructors you will need to insure that the input data is converted to the format of the
roman numeral you are keeping in the class.
• Destructor
• inputRoman – to read a roman numeral from a source (could be cin, could be a file)
• displayRoman – to display roman numeral to cout
• calcfromInteger – accepts an int parameter and stores the corresponding roman
numeral string into the object
• calcIntValue which returns through return value the int value of the roman numeral string in the object
有高手能告诉我写这个作业吗??我不知道写了!从inputRoman 开始就有点不知道了!
非常感谢谢!!!:blowzy::blowzy::blowzy::blowzy::blowzy::blowzy::blowzy:
(char * romanNumeral_ptr) which will (eventually) hold a roman numeral. The
ONLY data member will be this one. You must write the following methods:
• Default constructor
• Initial constructors which allow a char array as input or an int number. In each of these
constructors you will need to insure that the input data is converted to the format of the
roman numeral you are keeping in the class.
• Destructor
• inputRoman – to read a roman numeral from a source (could be cin, could be a file)
• displayRoman – to display roman numeral to cout
• calcfromInteger – accepts an int parameter and stores the corresponding roman
numeral string into the object
• calcIntValue which returns through return value the int value of the roman numeral string in the object
有高手能告诉我写这个作业吗??我不知道写了!从inputRoman 开始就有点不知道了!
非常感谢谢!!!:blowzy::blowzy::blowzy::blowzy::blowzy::blowzy::blowzy: