public void readInput(Data data) throws NumberFormatException, IllegalChoicesException {
        data.resetChoices();
        for (int i = 0; i < 4; i++) {
            JComboBox<Subject> thisBox = examComboBoxes.get(i);
            Subject selectedSubject = (Subject) thisBox.getSelectedItem();

            resetBackground(thisBox);
            //Check for multiple choices of the same subject
            for (int j = 0; j < i; j++) {
                if (examComboBoxes.get(j).getSelectedItem().equals(selectedSubject)) {
                    highlightTemporarily(examComboBoxes.get(j), null);
                    throw new IllegalChoicesException();
                }

            }
            selectedSubject.abinote = Integer.parseInt(markInputField[i].getText());
            if (i < 3) {
                selectedSubject.writtenExamSubject = true;
            } else {
                selectedSubject.oralExamSubject = true;
            }
        }
    }