# Write a program that converts a number entered in roman numberals to

1-Write a program that converts a number entered in Roman numberals to decinal form. Your program should consist of a class, say romanType. An object of rmanType should do the following:
a- Store the number a s a Roman numeral.
b- Convert and store the number into decimal form.
c- Print the number as a Roman numeral or decimal number as reqeusted by the user. (Write two separate funtions-one to print the number as a Roman numeral and the other to print the number as a decimal number.)
The decimal values of the Roman numerals are:
M. 1000
D 500
C 100
L 50
X 10
V 5
I 1
Remember the larger numeral preceding a smaller numeral means addition, so LX is 60. A smaller numeral preceding a larger numeral means subtraction, so XL is 40. Any place in a decinal number such as 1s place, the 10s place, and so on, requires zero to four Roman numerals.
d. Test your program using the folowing Roman numerals: MCXIV, CCCLIX, and MDCLXVI

2- Write the definition of the class dayType that implements the day of the week in a program. The class dayType should store the day, such as Sunday for Sunday. The program should be able to perform the following operations on an object of type dayType:
a. Set the day.
b. Print the day.late and return the day by adding . t larly, if today is Tuesday and we add 13 days, to da, the day to be returned is Froda days to the current day. For example, if the current day is Monday and we add 4 day
c. Return the day.
d. Return the next day
e. Return the previous day
f. Calculate and return the day by adding certain days to the current day. For example, if the current day is Monday and we add 4 days, the day to be returned is Friday. Similarly, if today is Tuesday and we add 13 days, the day to be returned is Monday.

3- Write the definitions of the functions to implement the operations for the class dayType as defined in Programming Execuse 2, Also, write a program to test various operations on this class.

Chapter 2:
2- Int his chapter, the class dateType was designed to implement the date in a program, but the member function setDate and the constructor do not check whether the date is valid before storing the date in the data members. Rewrite the definitions of the function setDate and the construcor so that the values for the month, day, and year are checked before storing hte date into the data menbers. Add a function member, isLeapYear, to check whether a year is a leap year. Moreover, write a test program to test your class.

6-In programming exercise 2, the class dateType was designed and implemented to keep track of a date, but it has very limited operations. Redefine the class dateType so that it can perform the following operations on a date in addition to the operations already defined:
a- Set the month
b- Set the day.
c- Set the year.
d- Returnt he month
e- Return the day
f- Return the year
g- Test whether the year is a leap year.
h. Return the number of days in the month. For example, if the date is 3-12-2011, the number of days to be returned is 31 because there are 31 days in March.
i. Return the number of days passed in the year. For example, if the date is 3-18-2011, the number of days passed in the year is 77. Note that the number of days returned also includes the current day.
j. Return the number of days remaining in the year. For example, if the date is 3-18-2011, gthe number of days remaining in the year is 288.
k. Calculate the new date by adding a fixed number of days to the datre. For example, f the date is 3-18-2011 adn the days to be added are 25, the new date is 4-12-2011.

20-
a. In Programming Execise 1 in Chapter 1, we defined a class romanType to implement Roman numberals in a program. Int hat exercise, we also implement Roman numerals ina program. In that exercise, we also implemented a function, rmanToDecimal, to cnvert a Roman numberal into its equivalent decimal number.

Modify the definition of the class romanToDecimal, to convert a Roman numeral into its equivalent decimal number.

Modify the definition of the class romanType so that the data membersare declared as protecred. Use the class string to maniputlate extraction operators for easy input and output. The stream insertion operator outputs the Roman numberal in the Roman format.

Also, include a member function, decimalToRman, that converts the decimal number (the decimal number must be a positive integer) to an equivalent Roman numeral format. Wrtie the definition of hte member function decimalToRoman.

For simplicity, we assume that onlyt he letter I can appear in from of another letter and that it appears only in fromt o f the letters V and X. For example, 4 is represented as XXXXIX. Also, 40 will be represented as XXXX, 190 will be representes as CLXXXX, and so on.
b. Derive a class extRomanType fromt he class romanType to do the following. I

Calculate the price
Pages (550 words)
\$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with Australia Assessments
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Military
good job
Customer 456821, March 28th, 2022
Psychology
Good journal.
Customer 459947, May 10th, 2022
Education
THANK YOU
Customer 463875, April 27th, 2023
Excellent analysis.
Customer 459667, April 2nd, 2022
Geography
Good job. Adequate introduction and thesis, has cited evidence & satisafies the question in context.
Customer 463019, June 8th, 2022
English 101
Good response. Next time, properly capitalize headings in the requested style.
Customer 460641, March 30th, 2022
Entertainment & Gaming
Avoid plagiarism.
Customer 452441, April 12th, 2022
Good work.
Customer 452615, May 9th, 2022
Other
Good.
Customer 462635, June 14th, 2022
Ecology
Good
Customer 453413, April 19th, 2020
Education
Customer 463875, April 29th, 2023
Nursing
poor service
Customer 453627, January 24th, 2020
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend