Having interactive tutorials is really valuable. For anyone learning the basics, for example writing and running a for-loop which prints 1–100 to the console is great and the student immediately grasps why loops are useful as opposed to writing 100-print statements.
When you get into more advanced topics, the value gained from using different patterns isn’t immediately apparent. Interfaces aren’t very valuable for someone who still has all code in a single file. I think at this stage the goal of the tutorial should slightly shift from “how it works” to “why use it”.
The example I provided isn’t perfect, maybe with more time it could be turned into something that compiles and still exhibits the usefulness. But I don’t believe there is too much value in having the student type something out into an IDE and confirming that, yes, it does print “Moo”.