Programming Exercise 4 Chapter 10 Defined Class Romantypeto Implement Roman Numbers Progra Q37289706

In programming Exercise 4 in Chapter 10, we defined aclass romanTypeto implement Roman numbers in a program. In thatexercise, we also implemented a function, romanToPositiveInteger,to convert a Roman number into its equivalent positive integer.

Modify the definition of the class romanType so that the membervariables are declared as protected. Use the class newString, asdesigned in programming Exercise 9, to manipulate strings.Furthermore, overload the stream insertion and stream extractionoperators for easy input and output. The stream insertion operatoroutputs the Roman number in the Roman format.

Also, include a member function, positiveIntegerToRoman, thatconverts a positive integer to an equivalent Roman number format.Write the definition

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.