A challenge for those who claim to know Java well

Discussion in 'Programming General' started by Pavel, Dec 12, 2008.

Thread Status:
Not open for further replies.
A challenge for those who claim to know Java well
  1. Unread #1 - Dec 12, 2008 at 7:49 PM
  2. Pavel
    Referrals:
    0

    Pavel Guest

    A challenge for those who claim to know Java well

    Hello.

    I have recently received an assignment where I have to write a program that will receive input Roman Numerals (e.g.: i, ii, ii, iv, v) and convert them into integer numbers and vice versa.

    How do you think I should go about doing this?
    No, I am not asking you to write the program for me, I am simply asking for help to get me started.
     
  3. Unread #2 - Dec 13, 2008 at 8:27 AM
  4. fromdhood101
    Joined:
    Sep 26, 2007
    Posts:
    440
    Referrals:
    0
    Sythe Gold:
    0

    fromdhood101 Forum Addict
    Banned

    A challenge for those who claim to know Java well

    Something like:

    Code:
    if (input == 1) {
    write("I");
    } else {
    write("Invalid number. Please try again!");
    }
    That's very basic, but should give you a basic idea?
     
  5. Unread #3 - Dec 13, 2008 at 5:11 PM
  6. cp
    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0

    cp an cat
    Banned

    A challenge for those who claim to know Java well

    His post was an example of how to do the conversion. It was meant to give you an idea what to do, not so you could bitch about it. Apply that concept to larger Roman numerals.

    I would say the easiest way is to loop through every character, add the number to the value depending on the letter (http://en.wikipedia.org/wiki/Roman_numerals#Symbols) and make the proper operations depending if the next letter is higher or lower than the one before it.
     
  7. Unread #4 - Dec 13, 2008 at 5:21 PM
  8. Pavel
    Referrals:
    0

    Pavel Guest

    A challenge for those who claim to know Java well

    Last I checked, the point of programming was to make basic repetitive structures with the least amount of typing possible. Typing out each and every single fucking possible case wasn't what I signed up for.
     
  9. Unread #5 - Dec 13, 2008 at 5:26 PM
  10. Nullware
    Joined:
    Jan 30, 2007
    Posts:
    1,761
    Referrals:
    4
    Sythe Gold:
    0

    Nullware Guru

    A challenge for those who claim to know Java well

    Clearly you're retarded because that's not at all what cp was saying. He was implying that you should parse the string entered and calculate the value based on what your function discovers at different positions. I don't even know why you're studying programming, you seem so useless.
     
  11. Unread #6 - Dec 13, 2008 at 5:33 PM
  12. cp
    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0

    cp an cat
    Banned

    A challenge for those who claim to know Java well

    Nullware +1

    Do you know what a "loop" is? If you don't, I suggest you drop your course before it gets worse.
     
  13. Unread #7 - Dec 13, 2008 at 6:19 PM
  14. war833
    Joined:
    Dec 11, 2008
    Posts:
    82
    Referrals:
    0
    Sythe Gold:
    0

    war833 Member

    A challenge for those who claim to know Java well

    Why are you even here if you are just going to moan about every single suggestion people give you?

    You've been told a good way to perform the conversion, now quit moaning. Jeeze...

    Do you even know what a loop actually is? If you don't, then you obviously haven't covered that work yet in your class therefore you probably wern't meant to use loops in your program.
     
  15. Unread #8 - Dec 13, 2008 at 7:02 PM
  16. Pavel
    Referrals:
    0

    Pavel Guest

    A challenge for those who claim to know Java well

    Yes, I do know what a loop is. But what would I put in the loop, you geniuses?
    All of the suggestions were fucking retarded.
    How would I form a loop like this, please explain fucking geniuses.
     
  17. Unread #9 - Dec 13, 2008 at 7:09 PM
  18. SuF
    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary

    SuF Legend
    Pirate Retired Global Moderator

    A challenge for those who claim to know Java well

    I will write the program because it is good practice.. Then i will try and help... i have no power, and my generator is about to die, so it might take awhile... LOL
     
  19. Unread #10 - Dec 13, 2008 at 7:09 PM
  20. cp
    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0

    cp an cat
    Banned

    A challenge for those who claim to know Java well

    Get out.
     
< UltiCrack v2 [PASS CRACK] | What exactly can you make with these programming languages? >

Users viewing this thread
1 guest
Thread Status:
Not open for further replies.


 
 
Adblock breaks this site