Skip to content

Write a class to convert Roman Numerals to numbers. You should use an OOP programming paradigm with Test-driven development approach in order to cover your method with appropriate tests prior to implementing them.

Notifications You must be signed in to change notification settings

abn-dev-01/RomanNumerals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# Test TASK: Roman Numerals conversion

Write a class to convert Roman Numerals to numbers. You should use an OOP programming paradigm
with Test-driven development approach in order to cover your method with appropriate tests prior to
implementing them.
Please use TDD and Clean Code concepts.
Values
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000

Additive and Subtractive Principles
Generally, Roman numerals are written in descending order from left to right, and are added sequentially,
for example MMVI (2006) is interpreted as 1000 + 1000 + 5 + 1.
Certain combinations employ a subtractive principle, which specifies that where a symbol of smaller value
precedes a symbol of larger value, the smaller value is subtracted from the larger value, and the result is
added to the total. For example, in MCMXLIV (1944), the symbols C, X and I each precede a symbol of
higher value, and the result is interpreted as 1000 plus (1000 minus 100) plus (50 minus 10) plus (5
minus 1).

- // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - //

About

Write a class to convert Roman Numerals to numbers. You should use an OOP programming paradigm with Test-driven development approach in order to cover your method with appropriate tests prior to implementing them.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages