Java question with member variables Boggle class ArrayList of class String // st
ID: 3848005 • Letter: J
Question
Java question with member variables
Boggle class
ArrayList of class String // stores data from data file with dice data
String // set to the name of input file “BoggleData.txt”
ArrayList of class String // stores data from data file with dictionary data
String // set to the name of input file “Dictionary.txt”
Boggle class
Create member variables of type:ArrayList of class String // stores data from data file with dice data
String // set to the name of input file “BoggleData.txt”
ArrayList of class String // stores data from data file with dictionary data
String // set to the name of input file “Dictionary.txt”
Explanation / Answer
The following is the definition of the Boggle class with all the required member variables. No functions(read or write) are included in the class. Only declaration of the variables themselves.Main class is taken to be inside the Boggle class, which can also be taken outside the Boggle class.
class Boggle{
public static void main(String[] args)
{
ArrayList<String> DiceData=new ArrayList<String>();
FileInputStream fin1 = new FileInputStream("BoggleData.txt");
ArrayList<String> DictionaryData=new ArrayList<String>();
FileInputStream fin2 = new FileInputStream("Dictionary.txt");
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.