Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

ArrayList Problem

Options
  • 13-04-2012 4:04pm
    #1
    Registered Users Posts: 28


    import java.util.*;
    import java.io.* ;

    public class WordSearchPuzzle
    {
    private char[][] puzzle ;
    private ArrayList<String> puzzleWords ;

    public WordSearchPuzzle(String[] args)
    {
    // puzzle generation using user specified words
    // The user passes in a list of words to be used
    // for generating the word search grid.
    }


    Hello im having great difficulty with this. I am finding it hard to figure out how to store a list of user defined words so i can later use to put into a 2d grid for a word Search
    Any Help would be appreciated
    Tagged:


Comments

  • Registered Users Posts: 130 ✭✭irishfeller


    Dmeaney92 wrote: »
    import java.util.*;
    import java.io.* ;

    public class WordSearchPuzzle
    {
    private char[][] puzzle ;
    private ArrayList<String> puzzleWords ;

    public WordSearchPuzzle(String[] args)
    {
    // puzzle generation using user specified words
    // The user passes in a list of words to be used
    // for generating the word search grid.
    }


    Hello im having great difficulty with this. I am finding it hard to figure out how to store a list of user defined words so i can later use to put into a 2d grid for a word Search
    Any Help would be appreciated


    What bit are you stuck on? Is your list of words supplied in the arraylist and you have to populate a 2d array?


  • Registered Users Posts: 28 Dmeaney92


    When we run the program the user has to enter in X number of Strings and they should be stored so they can be used in a later method to find the longest word entered in and be multiplied it by whatever number to make the 2d grid to ensure the words fit into the grid


  • Registered Users Posts: 130 ✭✭irishfeller


    Hey there is already a thread on this exact question in this forum:

    http://www.boards.ie/vbulletin/showthread.php?t=2056594368

    Must be one of the classmates eh.


  • Registered Users Posts: 28 Dmeaney92


    public WordSearchPuzzle(ArrayList<String> userSpecifiedWords)

    Sorry i got the header wrong it should be the one above me.
    Thanks for the link and yes it is haha we are just trying to see if i can get the question around. We just cant get the right solution


Advertisement