Results 1 to 5 of 5
- 07-17-2011, 11:44 PM #1
Member
- Join Date
- Jul 2011
- Posts
- 3
- Rep Power
- 0
Need alot of help with programming asentence abbreviation algorithm :(
Hello , ive been asked to write a java program that does the following :-
1- ask the user to input a sentence (heir entry may contain spaces, digits, and/or punctuation characters) which is probably the only thing i know how to do sadly ..
2- all single character words remain in the output String.
3- remove all vowels that are not single word characters from the output sentence.
4-all double characters will be single char even if there is spaces between words
5- numbers and spaces including punctuation remains in the output string
... the problem is that im a beginner at using JCreator .. actually at java itself so this program was really hard to me to try to write i know i have to use loop but cant implement it right
pretty frustrating
so any tips would be really helpful
- 07-17-2011, 11:48 PM #2
Start simply and add to it.
First get the sentence from the user. See the Scanner class for console line input
Look at the String class for methods to use with the String which is what you'll read with the Scanner class.
- 07-17-2011, 11:52 PM #3
Member
- Join Date
- Jul 2011
- Posts
- 3
- Rep Power
- 0
so far ive got to scanning the answer and saving it in StrIn which is my string input ive read some threads and searched about removing the vowels tho i still dont know how to leave it if it single char
- 07-18-2011, 12:06 AM #4
What defines a single character?i still dont know how to leave it if it single char
What separates characters? Spaces, commas, semicolons
- 07-18-2011, 12:36 AM #5
Member
- Join Date
- Jul 2011
- Posts
- 3
- Rep Power
- 0
Similar Threads
-
A* algorithm
By zjames in forum New To JavaReplies: 6Last Post: 11-25-2010, 12:02 PM -
Abbreviation in Java
By somnath6088 in forum New To JavaReplies: 2Last Post: 11-08-2010, 07:59 AM -
Algorithm help? :)
By Mirix in forum New To JavaReplies: 6Last Post: 05-24-2010, 02:08 AM -
My encrypting thingy lags alot..
By Addez in forum New To JavaReplies: 3Last Post: 09-15-2009, 11:33 PM -
Help with an Algorithm
By Manfizy in forum New To JavaReplies: 22Last Post: 07-03-2009, 07:16 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks