Results 1 to 4 of 4
  1. #1
    StefanPo is offline Member
    Join Date
    May 2011
    Posts
    1
    Rep Power
    0

    Default my first java project random words please help

    Hello..probably you will laugh when you will read my problem but i really am one novice in java..
    This is what i have to do:
    1)When launched, shows an input field to enter a sentence and a 'Process' button
    2)When 'Processed' button is pressed, the application shows the same sentence with the following modifications:
    The first and last letter of each word is kept the same.
    All other letters (if any) are randomly mixed
    3)The user can enter another sentence and start over
    i don't want to make you my project just explain where to read to do my project..
    i have done this and i understand it Hello, World | Android Developers
    i also know what i have to do with the alogiritm so as the letters to be mixed my biggest problem is that i don't know the java commands...so as please help me with the 1) for first

  2. #2
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    Give it a try and come back with any problems. The string class has some helpful methods(substring and charAt perhaps)

  3. #3
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,816
    Rep Power
    25

    Default

    1)When launched, shows an input field to enter a sentence and a 'Process' button
    That will require some GUI components. The are plenty of small sample programs here.
    Search for JFrame or JTextField for some.

  4. #4
    Dark's Avatar
    Dark is offline Senior Member
    Join Date
    Apr 2011
    Location
    Camp Lejuene, North Carolina
    Posts
    643
    Rep Power
    4

    Default

    Before you even make it GUI, you should get it working without it. Write your class scrambler and make it scramble the words. Then write a test class that uses a scanner input to send your custom text to the scrambler class. After that works, make your GUI.

    I suggest looking at the String API, especially the split method. This will make your life much easier.
    • Use [code][/code] tags when posting code. That way people don't want to stab their eyes out when trying to help you.
    • +Rep people for helpful posts.

Similar Threads

  1. Java task with words
    By madman333 in forum New To Java
    Replies: 2
    Last Post: 04-12-2011, 10:05 AM
  2. display random words from a string
    By Kenken in forum New To Java
    Replies: 4
    Last Post: 04-02-2011, 02:38 PM
  3. Random selection of words
    By netspinner in forum New To Java
    Replies: 3
    Last Post: 12-14-2010, 06:31 PM
  4. Help with class project, random number generator.
    By Christopher The Great in forum New To Java
    Replies: 4
    Last Post: 03-14-2009, 03:12 AM
  5. Aspose.Words for Java - 2.1.0.0
    By levent in forum Java Software
    Replies: 0
    Last Post: 05-24-2007, 11:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •