C++ easy program
I have three files: a header (a class), a main and a cpp
I basically need to edit the cpp to make the whole program work.
THESE ARE THE INSTRUCTIONS
1. roman.hpp: contains the declaration of class Roman.
2. roman.cpp: contains the incomplete implementation of the member function IncreaseWith() and two other functions convertIntToRoman() and convertRomanToInt().
You will complete roman.cpp such that the test cases in subdirectory tests pass.
You should not edit or modify roman.hpp.
Instance of class Roman stores a number as a Roman numeral string.
An object of class Roman is initialized either with a Roman numeral string or an integer.
The default constructor stores an empty string.
Member function GetInt() converts the stored Roman numeral string to an integer and returns it.
Empty string is considered to be a 0.
Member function GetRoman() simply returns the stored Roman numeral string.
The overloaded member function SetRoman() can take either an integer or a Roman numeral string to update the stored number.
Member function IncreaseWith() updates the current number by adding the Roman number passed as argument.
Non-member function convertIntToRoman() converts an integer to a Roman numeral string while convertRomanToInt() converts a Roman numeral string to an integer.
Please see the unit tests for more details on how the member functions work.
Roman Numerals:
A Roman numeral string is a sequence of characters ∈ {I, V, X, L, C, D, M}.
For example, 74 in decimal is represented as “LXXIV” = 50 + 10 + 10 – 1 + 5.
I IV V IX X XL L XC C CD D CM M
1 4 5 9 10 40 50 90 100 400 500 900 1000
You can use this table as a reference for integer-to-roman or roman-to-integer conversion.
Hard coding mappings between roman numerals and their corresponding integer values will result in a penalty.
Assumptions:
• The input Roman numeral string is always valid.
• Since there cannot be more than 3 consecutive sequence of a Roman numeral character, the maximum possible number will be 3999, i.e. MMMCMXCIX.
• The input integer will always be ≥ 0.
• The final value to be updated by IncreaseWith() will always be ≤ 3999.
Willing to pay 20$
I NEED IT IN 24 HOURS
THAT MEANS 7:00 PM EST (USA TIME)
on Wednesday Febuary 8 2017
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
About Writedemy
We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.
How It Works
To make an Order you only need to click on “Place Order” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Are there Discounts?
All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.