Arabic Numbers to Roman Numerals

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Arabic Numbers to Roman Numerals

  1. #1
    Join Date
    Jul 2007

    Arabic Numbers to Roman Numerals

    Im new to JAVA. I have difficulty of having two programming languages( JAVA AND C++ ) at the same time, Im fully loaded of 32.5 units at school, I like to know more that's why i'm asking help. My point is to compare my work with, although i made my own but its too long and that would be a minus points for me. I have another problem in java, the problem says that "Make a program that conversts arabic numbers to roman numerals", criteria: make a class called RomanNumerals and an object called RomanConverter and use constructor. This problem is easy for me but it does not meet the criteria and doesn't use use a constructor, I used Switch Case. Would you help me with this. And also I would like to ask something about the buffered reader, I have difficulty in outputting an integer, I dont know where to put the Integer.parseInt(), can you give me an example of this. And a little idea about the criterias that i have mentioned. Pls. post some sample codes for me.

  2. #2
    Join Date
    Dec 2004
    San Bernardino County, California
    well, you need to construct an instance named RomanConverter of your RomanNumerals class. How are you going to construct that instance? (Are there data fields you need to initialize? Even if it is just a "int data" field that you initialize as zero)

    data = 0;

    this isn't about the methods you use in your RomanNumerals class - perhaps providing a

    String convert( int number)

    method in your RomanNumerals class, and when you invoke the method in your romanConverter instance

    int test = 454;
    String output;
    output = romanConverter.convert(test);

    in order to get the roman numeral representation to the arabic number you supplied. It is about thinking of dispatching any need you have of producing a representation of the value in RomanNumerals to an instance of that class - a "separation of concerns" - rather than writing a "one overall blob of a program".

Similar Threads

  1. decimal to roman numerals conversion
    By jhaycee7042 in forum VB Classic
    Replies: 2
    Last Post: 02-26-2007, 11:09 PM
  2. Please Help-Roman Numerals Program with classes
    By sailinghunter in forum C++
    Replies: 3
    Last Post: 08-09-2006, 05:14 PM
  3. Replies: 8
    Last Post: 06-19-2006, 05:05 AM
  4. Replies: 1
    Last Post: 05-31-2006, 02:14 AM
  5. ID Numbers are out of sequence
    By sensei in forum VB Classic
    Replies: 1
    Last Post: 05-18-2006, 01:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center