EDIT: Essentially, I am trying to do the same thing as typing \"javac sim.java\" and then \"java sim (commands)\". Is there a way to replace this using a makefile?
S
make executes a recipe by executing its dependencies, then the recipe itself. Therefore if you add a command which runs your compiled code to the top recipe, typing 'make' will also run the code after it is compiled. I cannot believe how many people do not know this!
Something like:
sim: sim.class
java sim
Will do what your tutor requires.