Two Plus Two Older Archives

Two Plus Two Older Archives (http://archives2.twoplustwo.com/index.php)
-   Other Other Topics (http://archives2.twoplustwo.com/forumdisplay.php?f=32)
-   -   $10 to finish this java program for me (http://archives2.twoplustwo.com/showthread.php?t=369604)

asofel 11-01-2005 05:32 PM

Re: $10 to finish this java program for me
 
[ QUOTE ]
[ QUOTE ]

On another note, does anyone know how you would do this problem?

Write a Java program that accepts a string from a terminal and converts all the lowercase letters in the string to uppercase, and all the uppercase letters in the string to lowercase.

It's not arrays because we have not reached that chapter yet.

[/ QUOTE ]

Aren't their methods in the api to do this? I don't know them off the top of my head, but toLowerCase(), toUpperCase()?
Even without them, just find a relationship between lower case and upper case ASCII values and do it that way.

[/ QUOTE ]

Most likely the second part is what is required. Just do a check for the value and if less than X, add Y, etc. Get a chart of the values and you should be good.

kurosh 11-01-2005 05:35 PM

Re: $10 to finish this java program for me
 
Already did it. Converted them to integers then added or subtracted and converted them back.

asofel 11-01-2005 05:50 PM

Re: $10 to finish this java program for me
 
[ QUOTE ]
Already did it. Converted them to integers then added or subtracted and converted them back.

[/ QUOTE ]

oh ok cool.

btw, i know it sucks, but unless this is a completely meaningless major for you, really try to get through the programs yourself. ask 1000 questions, but make sure you can do things as well, or its going to get really hard at the end and you'll be frustrated as [censored]...

11-01-2005 07:21 PM

Re: $10 to finish this java program for me
 
A side note, even though you finished already.

Character.isUpperCase(ch)/Character.isLowerCase(ch)
Character.toUpperCase(ch)/Character.toLowerCase(ch)

These would have helped. I recommend that if you keep programming, make friends with the Java API. It will make your life a lot easier.

Shilly 11-01-2005 07:24 PM

Re: $10 to finish this java program for me
 
Wow, this reminds me of taking Java last year, but I wasn't smart enough to try to find someone to pay to do it for me.

BadBoyBenny 11-01-2005 07:25 PM

Re: $10 to finish this java program for me
 
[ QUOTE ]
Someone who struggles with syntax is not going to have success as a programmer.

[/ QUOTE ]

Especially after 5 classes


All times are GMT -4. The time now is 07:28 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.