Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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");

}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote