Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 12 of 12

Thread: A Program that will ask five letters and create a possible words

  1. #1
    Junior Member
    Join Date
    Sep 2012
    Location
    Borongan City, E. Samar Philippines
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default A Program that will ask five letters and create a possible words

    hi, I'm James.. I am a new user of java, our teacher gives us a project: "Write a program that will ask five letters from the user and automatically create possible words for the given letters.",.. I search this @ google but still i can't find an idea on how to fix this, do you have any idea of this kind of problem in java?.

    thank you so much..


  2. #2
    Super Moderator curmudgeon's Avatar
    Join Date
    Aug 2012
    Posts
    1,130
    My Mood
    Cynical
    Thanks
    64
    Thanked 140 Times in 135 Posts

    Default Re: A Program that will ask five letters and create a possible words

    You may wish to tell us which step *exactly* are you stuck on?

  3. #3
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: A Program that will ask five letters and create a possible words

    Is this a "make all possible combinations" project?
    For example. given 1,2,3 : 123,132,213,231,312,321
    If you don't understand my answer, don't ignore it, ask a question.

  4. #4
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: A Program that will ask five letters and create a possible words

    @jms25 Please see the sticky at the top of this forum titled: Sticky: This Forum is for Saying Hi, not for Asking Technical Questions (READ BEFORE POSTING)

  5. #5
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: A Program that will ask five letters and create a possible words

    Thread moved from members introductions

  6. #6
    Junior Member
    Join Date
    Sep 2012
    Location
    Borongan City, E. Samar Philippines
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: A Program that will ask five letters and create a possible words

    Quote Originally Posted by Norm View Post
    Is this a "make all possible combinations" project?
    For example. given 1,2,3 : 123,132,213,231,312,321
    yap!, thanks i think that's it, coz our instructor didn't give the actual output.. what if five letters example: A,B,C,D,E.. and it will output all possible strings/words that can be formed using the letters given. how can we do that?.

    thanks Norm..

  7. #7
    Junior Member
    Join Date
    Sep 2012
    Location
    Borongan City, E. Samar Philippines
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: A Program that will ask five letters and create a possible words

    Quote Originally Posted by curmudgeon View Post
    You may wish to tell us which step *exactly* are you stuck on?
    @ curmudgeon.. A program that will ask for five letters e.g. "A,B,C,D,E" and will ouput all possible Strings/words that can be formed using the letters given.
    how can we do that?

    thanks

  8. #8
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: A Program that will ask five letters and create a possible words

    What techniques has your instructor talked about? Did he give you any hints or clues on how to solve this?
    If you don't understand my answer, don't ignore it, ask a question.

  9. #9
    Junior Member
    Join Date
    Sep 2012
    Location
    Borongan City, E. Samar Philippines
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: A Program that will ask five letters and create a possible words

    Quote Originally Posted by Norm View Post
    Is this a "make all possible combinations" project?
    For example. given 1,2,3 : 123,132,213,231,312,321
    Quote Originally Posted by Norm View Post
    What techniques has your instructor talked about? Did he give you any hints or clues on how to solve this?
    ahm, actually our instructor didn't give any hints or clues on how to solve this.. I'm trying to approach my instructor, for asking for any techniques but she's not around now in our school.

  10. #10
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: A Program that will ask five letters and create a possible words

    Do you know what a recursive method call is? That is a common way to solve this problem. That is what would be used when the input can be any number of letters.
    If your problem will always have 5 letters, then nested loops could be used.
    If you don't understand my answer, don't ignore it, ask a question.

  11. #11
    Junior Member
    Join Date
    Sep 2012
    Location
    Borongan City, E. Samar Philippines
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: A Program that will ask five letters and create a possible words

    Quote Originally Posted by Norm View Post
    Do you know what a recursive method call is? That is a common way to solve this problem. That is what would be used when the input can be any number of letters.
    If your problem will always have 5 letters, then nested loops could be used.
    ahm, i never try that.. do you have any syntax recursive method for letters?.. thanks

  12. #12
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: A Program that will ask five letters and create a possible words

    with recursion, in a loop, you take one item from the list and past the remaining items to the next level. Continue on down until only one left.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Replies: 12
    Last Post: March 17th, 2013, 01:38 AM
  2. [SOLVED] Words with and without capital letters.
    By Purple01 in forum Java Theory & Questions
    Replies: 3
    Last Post: September 19th, 2012, 01:03 PM
  3. [SOLVED] How do I make my program accept letters?
    By tyb97 in forum What's Wrong With My Code?
    Replies: 14
    Last Post: September 30th, 2011, 06:27 PM
  4. [SOLVED] Program to find how many letters start with vowels
    By Lokesh in forum What's Wrong With My Code?
    Replies: 4
    Last Post: February 14th, 2011, 05:58 AM
  5. Replies: 3
    Last Post: February 1st, 2010, 12:24 AM

Tags for this Thread