GithubHelp home page GithubHelp logo

abn-dev-01 / romannumerals Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 9 KB

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.

Java 100.00%
java algorithms thinking-in-java

romannumerals's Introduction

# 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).

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

romannumerals's People

Contributors

abn-dev avatar abn-dev-01 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.