Presentation on theme: "Introduction to Programming Using simple games to convey introductory concepts MERLOT International Conference 2004 Tracey Jensen Assistant Professor,"— Presentation transcript:
Introduction to Programming Using simple games to convey introductory concepts MERLOT International Conference 2004 Tracey Jensen Assistant Professor, IT Macon State College
Objectives Explain how simple games may reduce anxiety for students. Discuss how tic tac toe can be used to convey introductory programming concepts. Discuss additional concepts that may be covered using games. Explore other simple games as options.
Why use games? Overcome abstract nature of computer programming Relate to many students with something familiar Create a practical application that may actually be used Many students express a desire to create a game
How difficult can tic-tac-toe be? Create an application to play tic-tac-toe: –Two players Disallow changes to another player’s selection Keep track of whose turn –Maintain and display scores Wins, ties Allow board to be reset for another game Allow game to be reset for new players
Planning Objectives Understand how programs are planned Explain the six problem-solving steps used to create a computer program Complete an IPO chart –Algorithm pseudocode and flowcharts Desk-check an algorithm
Concepts - Analysis Key Components: –Two player, Tic-tac-toe, Record of wins, ties Problem Solving - SDLC Pseudocode –Use of control structures with conditions for evaluating wins and ties –Alternating turns –Resetting playing surface Flowcharting concepts
Interface Design Objectives Understand how well designed interfaces add to the success of your application. Explain and apply information hierarchy. Explain how element relationships impact user response. Relate items for consideration in readability and interface flow. Explain how to create unity and integration in your application and its environment.
Interface Design Objectives (Continued) Explain how color can be used for visual enhancement. Understand the impact on the user of using too much or inappropriate color. Explain how the use of fonts can impact your application’s usability. Explain how dimensionality is used in applications.
Control Structures Objectives Understand and apply the three types of control structures –Sequence –Selection Wins or ties Determining location selected –Repetition Reset playing surface Looping through array of possible wins Sorting Write algorithms to represent the control structures
Variables & Constants Objectives Understand and use the assignment operator Differentiate between variables and constants Understand and use the various data types Convert user input into variables Understand type casting Use proper naming conventions for variables and constants Define and apply variable/constant scope
Functions & Sub Procedure Objectives Understand and use function correctly –Return winner Understand and use Sub procedures –Reset board
Array Objectives Understand and use an array of variables (multidimensional) –Determine win combinations –Control collections for playing surface Use For Each/Next loop structure –Reset playing service Understand and access array items directly or indirectly
Debugging Objectives Understand and resolve: –Runtime errors –Logic errors –Syntax errors Use tools for debugging –Stepping through code Into, Over, Out –Break points
Other Considerations Menus vs. Buttons Multiple Forms –Splash –About –Help Files –Maintain top ten
Other Games Hangman Nut Shell Game Connect 4 Minesweeper
Summary Simple games add interest to introductory programming classes. Games contain all the concepts required to complete an introductory programming class. Games often overcome the abstract nature of programming for students.