Teaching Graphical User Interfaces And Event Handling Through Games

The introductory programming sequence for both computer engineering and computer science majors at Ohio Northern University can be summarized as follows. The first course covers the concepts of sequence, iteration, and selection. The second course explores the object-oriented programming paradigm. Finally, the third course reinforces the object-oriented programming paradigm and introduces the graphical user interface (GUI) and the related concept of event handling. After two courses with a text-based focus, the introduction of visual components in the third course provides an opportunity to excite students about programming. However, in order to reach today’s students, one must understand that their perception of computers is different than that once held by today’s faculty when they were entering the profession. Many of our students have their conceptual images of computers formed primarily through their interactions with video games and GUI-based applications. Given this context, the use of games is an effective motivational tool as students now have the opportunity to study that which they easily relate to. Most games are both visual and event-driven; usually there is a graphical element such as playing cards or a game board, and the play of the game progresses through the handling of discrete user-generated events. As assignments, games are often challenging to write, but provide both a definite goal to strive for and a greater sense of accomplishment as the completed program actually does something. Furthermore, by providing extra credit opportunities for the implementation of additional game features, students become very involved in their programming, helping them to learn the concepts taught in the course – and often to learn advanced concepts on their own. Along with the motivational value of such assignments, the writing of games promotes strategic thinking [1]. Students must consider how to properly utilize data structures to represent the physical elements of the game and how to establish the necessary heuristics for evaluating the status of the game. As getting the logic right is required for the game to play properly, and as having a correctly working game provides the student with a significant amount of positive feedback, the strategic aspect of writing game programs forces students to pay greater attention to the construction of their code than they would otherwise be experiencing. There is another valid reason for the early introduction of GUIs and event handling. Frankly, while still useful, the teletype approach to programming cannot fully prepare students with the skills required for 21 st century software development [2]. Modern platforms are increasingly graphically oriented and event driven, and so software development in this area needs to be addressed. Furthermore, the tools for such development have grown to the point that much of the "gruntwork" is handled either internally by the system or automatically generated by the IDE used to write the program. In short, the complexity of such a task has diminished to a point where a first-year student can successfully accomplish it. Session 2620