problem with Java homework...
Ok, the problem here is the assignment asks me to create a program that asks the user to either enter a number and convert it to a roman numeral or convert a roman numeral to an int.
What I've done so far is to set up a basic menu that allows the user to choose which operation they want. So for example lets say they want to convert a roman numeral to a number...
I have the input set up to take a user inputted string, convert it to upper case and then I'm stuck.
I'm confused as to how to take the user entered string and convert it into an integer.
Lets say for example the user entered the roman numerals MCXIV. The program needs to spit out 1114.
The only thing that I can think to do would be if statements but that would be impossible because theres an infinite amount of combinations.
Any help would be greatly appreciated.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL