A game engine is a framework that allows you to create games. Assuming you don’t have tons of content (and I’m sure you didn’t in an intro CS class), building a game is an easier task than building a game engine.
Let me ask you this. What were the parameters of your assignment? What libraries were you allowed to use.