Asee peer logo

Writing Card Games: An Early Excursion Into Software Engineering Principles

Download Paper |

Conference

2005 Annual Conference

Location

Portland, Oregon

Publication Date

June 12, 2005

Start Date

June 12, 2005

End Date

June 15, 2005

ISSN

2153-5965

Conference Session

Education Ideas in Software Engineering

Page Count

11

Page Numbers

10.1478.1 - 10.1478.11

DOI

10.18260/1-2--14554

Permanent URL

https://peer.asee.org/14554

Download Count

2809

Paper Authors

author page

John Estell

Download Paper |

Abstract
NOTE: The first page of text has been automatically extracted and included below in lieu of an abstract

Writing Card Games: An Early Excursion into Software Engineering Principles

John K. Estell Electrical & Computer Engineering and Computer Science Department Ohio Northern University

1. Introduction

Card game programs are both visual and event-driven; playing cards serve as a well-recognized graphical element 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. Along with the motivational value of such assignments, the writing of games promotes strategic thinking. A programmer must consider how to properly utilize data structures to represent the elements of the game and how to establish the necessary heuristics for evaluating the status of the game.

In the past, each card game program had to be essentially written from scratch, but what really changes from implementation of one game to the next? How does the concept of a card or a deck differ? There is a great deal of functionality that stays the same, regardless of the card game being implemented. This card game assignment is used in our third introductory programming course, where after two quarters of C++ in a text-based context, students are introduced to graphical user interfaces (GUI), event handling, and code libraries (including the Collections Framework) using Java. This assignment takes an object-oriented programming approach to the problem to determine the constituent parts of a card game, from which contracts are developed that students are asked to implement. By taking this approach, the writing of the code can be compartmentalized into classes that are easy to write and can be readily reused, leaving only a small amount of code that has to be explicitly written for a particular card game application. Additionally, multiple test programs are written during the development of the contracted classes, allowing for reliability verification as well as providing first-hand experience with class reusability. With this approach, students receive an early exposure to the essence of software engineering principles: working out the specification, design, and testing of a construct of interlocking concepts involving data sets, relationships among data items, algorithms, and invocations of functions1. This exposure can then serve as a foundation upon which these concepts can be expanded and refined throughout the remainder of the curriculum.

Proceedings of the 2005 American Society for Engineering Education Annual Conference & Exposition Copyright © 2005, American Society for Engineering Education

Estell, J. (2005, June), Writing Card Games: An Early Excursion Into Software Engineering Principles Paper presented at 2005 Annual Conference, Portland, Oregon. 10.18260/1-2--14554

ASEE holds the copyright on this document. It may be read by the public free of charge. Authors may archive their work on personal websites or in institutional repositories with the following citation: © 2005 American Society for Engineering Education. Other scholars may excerpt or quote from these materials with the same citation. When excerpting or quoting from Conference Proceedings, authors should, in addition to noting the ASEE copyright, list all the original authors and their institutions and name the host city of the conference. - Last updated April 1, 2015