Question: Write this j ava program and create a JUnit test clas s for it: Replace the _individual_ digits in the current string, between startPosition and
Write this java program and create a JUnit test class for it:
Replace the _individual_ digits in the current string, between startPosition and endPosition (included), with the corresponding Roman numeral symbol(s). The first character in the string is considered to be in Position 1. Digits are converted individually, even if contiguous, and digit "0" is not converted (e.g., 460 is converted to IVVI0).
* @param startPosition first character to consider
* @param endPosition last character to consider
* @throws MyIndexOutOfBoundsException
If either "startPosition" or "endPosition" are out of bounds (i.e., either less than 1 or greater then the length of the string)
* @throws IllegalArgumentException
If "startPosition" > "endPosition" (both in bounds)
void convertDigitsToRomanNumeralsInSubstring(int startPosition, int endPosition) throws MyIndexOutOfBoundsException, IllegalArgumentException;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
