public static void main(String[] args) {
        GradedActivity act = new GradedActivity();
        act.setScore(83);
        FinalExam exam = new FinalExam(10, 7);
        PassFailActivity pf = new PassFailActivity();
        pf.setScore(55);

        GradedActivity[] activities = {act, exam, pf};

        for (GradedActivity activity : activities) {
            if (activity instanceof FinalExam) {
                FinalExam f = (FinalExam) activity;
                System.out.println("Final Exam: " + f.getNumRight() + "/" + f.getNumQuestions() + " - " + f.getGrade());
            } else if (activity instanceof PassFailActivity) {
                PassFailActivity p = (PassFailActivity) activity;
                System.out.println("Pass/Fail Activity: " + p.getScore() + " - " + p.getGrade());
            } else if (activity instanceof GradedActivity) {
                GradedActivity g = (GradedActivity) activity;
                System.out.println("Graded Activity: " + g.getScore() + " - " + g.getGrade());
            }
        }

    }