Teaching OOP in C++ using an artificial life framework

  • Authors:
  • Richard E. Pattis

  • Affiliations:
  • Computer Science Department, Carnegie Mellon University, Pittsburgh, PA

  • Venue:
  • SIGCSE '97 Proceedings of the twenty-eighth SIGCSE technical symposium on Computer science education
  • Year:
  • 1997

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper explores the framework method for teaching object-oriented programming. Specifically, it describes a hierarchy of C++ classes that implement the framework for an Artificial Life simulator. Students learn how to read these classes and extend them via inheritance: they design and implement subclasses that encapsulate the behavior and state of environments and the entities that inhabit them. The simulator constructs an artificial world from objects of these subclasses; then, it animates these objects as they interact during the simulation. This paper includes one sample project and both subclasses that implement its solution.