[Solved] How to use 1 setter for multiple instance variables


I would suggest to make an int array to store your variables, so instead of:
private int qz1, qz2,….
do

private int [] quizValues;

You can then get a value for a quiz:

public int getQuizValue(int storePositionOfQuiz) {
  // check for outOfBounds!
  return this.quizValues[storePositionOfQuiz];
}

If you want you can then initialize the quiz values with using a int-array as parameter

public void setQuizValues(int [] newValues) {
  this.quizValues = newValues;
}

solved How to use 1 setter for multiple instance variables