Click to reopen instructions.

Goal for this assignment: Define at least three classes that implement java.lang.Runnable. Each class should be defined in its own file (which you can create by clicking the + sign at the top of the editor) and should print something using IO.println. Then in the DoStuff class’s main method, create a List<Runnable> and add instances of your classes to it. Then write a loop over that list that calls run on each Runnable.

If you finish that quickly, you can experiment with other interfaces such as Comparable: can you figure out how to make your runnables Comparable to each other and use a java.util.PriorityQueue instead of a List so your runnables run in priority order rather than the order you add them to the list.

Put definitions here.

Revisions: