Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can you please help me out with wtriting code in Java for this program? In JAVA please Please read question in uploaded picture. Write a
Can you please help me out with wtriting code in Java for this program? In JAVA please
Please read question in uploaded picture. Write a program that takes as input positive integers and converts them into their Roman numeral system equivalents . Please show out put if possible
Program Assignment H2 (25 points) Write a program that takes as input positive integers and converts them into their numeral system equivalents Roman Requirements: Check for valid input your program should handle runtime exceptions caused by invalid input Your program should continue running until the user indicates a desire to quit Besides checking for input validity, your program must check for data out of bounds (as described below) and deal with it in a reliable manner (ie. don't crash and don't produce bad output) The Roman numeral system uses the following symbols to represent the numeric values listed below: 50 00 500 1000 Numbers are formed according to the following rules: Only numbers greater than 0 and up to 3999 are represented (your program should check for this) As in the decimal system, the thousands, hundreds, tens and ones are expressed separately. The numbers 1-9 are expressed as VII VIII Generally, an 'I' preceding a 'V' or 'X' is subtracted from the second letter s value, and you never have more than 3 'I's in a row. Tens and hundreds are done the same way, except that the letters X, L. Cand C, D, M are used instead of V and X respectively A sample program run Hail Caesar! Enter a number to be converted to Roman nunerals, or 0 to quit: 1978 That number is McMLXXVIII Enter a number to be converted to Roman numerals, or 0 to quit: quit quit is not valid input Try again Enter a number to be converted to Roman numerals, or 0 to quit: 5 is out of bounds. Please enter a number between 1 and 3999 Enter a number to be converted to Roman numerals, or 0 to quit: 267 That number is CCL XVII Enter a number to be converted to Roman numerals, or 0 to quit: 0 Beware the ides of Marchi Computer Science Page 1 Sheller csisp17p2 workStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started