Abstract
Computer programming is one of the most important subjects for undergraduate computer science students, it is usually taught at universities during the first few semesters. There are many approaches to teach and learn computer programming. Some may prefer teaching/learning procedural programming first, others object-oriented programming first. In any case, to acquire good programming skills, students need to learn various data types, data structures, control structures, and the syntax of the chosen programming language. Furthermore, and most importantly, they need to acquire good logical and algorithmic thinking. This might cause big problems for new computer science students because acquiring such a thinking takes many years of practice. Students need to solve a huge number of various programming problems from easier to harder ones. But how can teachers motivate students to solve so many and so complex programming tasks? Because most of the undergraduate computer science students like playing computer games, we think creating their own games might be a big motivating factor. In this paper, first, we briefly summarize some possible approaches to teach object-oriented programming (OOP). Next, we describe our method of teaching computer programing at J. Selye University, focusing especially on teaching OOP by developing simple games. We think, to learn OOP, students need to have some basic knowledge of structural programming first. That's why they learn standard C programming language during the first two semesters, and they start learning OOP using the C# programming language only from the third semester. The main part of this article deals with the teaching and learning OOP by creating computer games. By developing a simple tic-tac-toe game, students learn how to instantiate objects from the "Button" class, and how to use these objects. Later, by creating other puzzle games (fifteen puzzle, matching game, minesweeper), students learn how to create own classes by deriving them from the "Button" class, how to add fields and methods into them. Finally, students will be able to create more complicated games using OOP techniques.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.