The DACS Guide to Writing Exams

1. Multiple Choices

Multiple choice questions are great! Easy to mark with ANS, they save a load of time. When writing a multiple choice question, numbering and lettering should be used to full effect to throw students off the scent. If they could just read the question and understand it, they might get it right!

Example:

Three students Alice (A), Bob (B), and Charlie (C) have developed three algorithms with the following runtimes: A:O(b * n), B: O(n^c) and C: O(a * log(n)), where b = 1, c = 2, and a = 3. The algorithm's runtimes were measured and are shown in the graph above labelled as numbered 1, 2, and 3. Match up the correct algorithm to the runtime:

  1. two
  2. one
  3. three
  1. Charlie
  2. Bob
  3. Alice

2. Coding Questions

Nowadays students are using high-tech IDE's and even GPT's to write code, not like back in the day when you had to punch your own cards by candlelight and walk uphill both ways to the faculty. Despite the fact that you preach "Clean Code", and show slides telling your students to name variables as if they were their firstborn, you should always remind them how lucky they are to have gigabytes of memory to play with and that they don't know how hard REAL coding was.

We can do this by using all the tricks! Single variable names, incrementing or decrementing inline, or just anything that technically works, but is really unadvisable to do in the real world. Write code like you are The Riddler! Here's a great example for you to use:

                    public class Fibonacci
                    {
                        public static void main(String[] args) {
                            int n, p;
                            f[p++] = 1;
                            f[--p] = 0;
                            n = 10;
                            int[] f = new int[++n];

                            for (int i = 2; i <= n; i++) {
                                f[i] = f[i-1] + f[i-2];
                            }
                            System.out.println(f[n]);
                        }
                    }