private static Question[] generateQuestions(int n)
	{//method for creating questions of random size (except for singlechoice) and random answer indexes
		Question[] questions = new Question[n];
		Random rand = new Random();
		
		for(int i = 0; i < n; i++)
		{
			if(rand.nextBoolean())//MultipleChoice
			{
				//int tmp = rand.nextInt((n-2)) + 2; didnt want to generate large number of answers for this
				//but can be anything up to 25, as the alphabet is indexed from 0-25, feel free to change this
				//and test how many answers MultipleChoice can have
				int tmp = rand.nextInt(5) + 2;//range from 2-6 for demonstration
				
				String[] answers = new String[tmp];
				
				for(int j = 0; j < tmp; j++)
				{//generic answers array, could be anything
					answers[j] = "Answer" + j;
				}
				
				tmp = rand.nextInt(tmp) + 1;//range 1-5
				int[] answersIndex = new int[tmp];
				ArrayList<Integer> alreadyAdded = new ArrayList<Integer>(tmp);
				int ansInd = -1;
				
				//initialize array
				for(int j = 0; j < tmp; j++)
					answersIndex[j] = -1;
				
				for(int j = 0; j < tmp; j++)
				{//keep looping until sufficient number of non-same answer indexes chosen
					do { ansInd = rand.nextInt(answers.length); }
					while(alreadyAdded.contains(ansInd));
					
					alreadyAdded.add(ansInd);
					answersIndex[j] = ansInd;
				}
				
				try {//since multiplechoice cant go beyond 26 answers, need try catch block
					questions[i] = new MultipleChoice("Question " + (i+1) + ".", answers, answersIndex);
				} catch (Exception e) { e.printStackTrace(); }
			}
			else//SingleChoice
			{
				questions[i] = new SingleChoice("Question " + (i+1) + ".", rand.nextBoolean());
			}
			
			//spent 10 minutes wondering why my questions were returning null, turns out I forgot to call setUpAnswers here
			questions[i].setUpAnswers();
		}
		
		return questions;
	}