GAIA - Group for Artificial Intelligence Applications



Role Play: Active Learning to teach Object-Oriented Design Concepts

Nowadays, we successfully apply an experience-based teaching approach in our object-oriented design courses. This approach actively involves the students, who collaborate in, both, the comprehension and development of designs. CRC cards and role-play sessions, frequently used in software design processes in industry, are the active learning techniques that support our teaching approach. CRC cards help to discuss and evaluate an object-oriented design collaboratively. CRC cards help to discuss and evaluate an object-oriented design collaboratively.
CRC cards help to discuss and evaluate an object-oriented design collaboratively. After creating the responsibilities of each class solely, designers can evaluate how classes interact simulating the execution of a use case. This simulation forces participants to reason about the proposed design solution and to verify if they can reach a better one. Role-play activities are employed to simulate the scenarios using CRC cards. During the role play, participants interact among them, learning from themselves, the other participants and the played roles.

The practical sessions in our courses follow the next pattern:

  1. Selection of the design scenario. The instructor selects an appropriate scenario among the design scenarios used in the course. A design scenario consists of a case study (the design problem), an initial (and maybe incomplete) solution, and a set of use cases that will be used during the simulation in order to understand the proposed solution.
  2. Role assignment. Each design scenario has a set of roles (objects) that should be played by the students during the role-play simulation. The instructor binds each student to a specific role and provides her with the corresponding CRC card.
  3. Cycle simulation-modification. The instructor starts the simulation related to a use case by sending the first message to the appropriate object (student). The rest of the simulation is “student-directed”: students are responsible for modifying CRC cards, when necessary, and they decide when the simulation finishes. There are different types of changes, from the addition, removal or modification of responsibilities in a class, to the application of a design pattern and the consequent restructuring of a set of classes. After a change in CRC cards the simulation could continue. When this changes affect past simulation steps, the instructor resumes the simulation. During the simulation, the instructor can help the students when a deadlock happens. Students can also communicate among them in order to know about their responsibilities. The instructor registers the simulation by constructing a Role-Play Diagram (RPD). A RPD is a semi-formal representation of a scenario execution in an object-oriented application that capture objects’ state. The ability of tracking each object state is essential in our approach because we need to represent the initial attribute values and how they change along the role-play simulation. So, in our approach, RPDs are a more useful representation tool than UML sequence and collaboration diagrams.
  4. Evaluation. After finishing the simulations of all the use cases in a scenario, the instructor evaluates the resulting design. If the design is appropriate, the practical session finishes. Otherwise, the instructor discusses with the students the pitfalls found in the resulting design and analyses possible improvements. In this case, the practical session goes back to step 3.

Here you can read more about a sample session using this approach to teach the Prototype Pattern.

The good results obtained during the empirical evaluation of this active learning approach have motivated us to transfer our teaching methodology to virtual environments. Using our previous experience developing game-based learning environments and taking ingredients from the interface and gameplay of first-person shooters and sport games, we have designed a role-play virtual environment (RPVE) that intends to maintain, and even reinforce, the benefits of role-play in the classroom. We developed ViRPlay3D, a RPVE to understand object-oriented software behavior.

Once we completed a prototype of ViRPlay3D we have evaluated the use of the environment with students. In november 2008 we have performed an experience using ViRPlay3D in classrooms to teach basic concepts from object-oriented programming. The evaluation results are presented in this technical report (in Spanish).

Authors: Guillermo Jiménez Díaz, Mercedes Gómez Albarrán y Pedro A. González Calero

Materials
We have applied the teaching approach described in two academic years: 2005-2006 and 2006-2007. Here you can download the slides employed in the role-play sessions (in Spanish)
Overview

Design Patterns: An active approach
CRC Cards for auxiliary Java classes

Protoype Pattern

Script
"Before" CRC Cards
"After" CRC Cards

State Pattern

Script
"Before" CRC Cards
"After" CRC Cards

Observer Pattern

Script
"Before" CRC Cards
"After" CRC Cards

Composite Pattern

Script
"Before" CRC Cards
"After" CRC Cards

Adapter Pattern

Script
"Before" CRC Cards
"After" CRC Cards

Assessment Forms
Here you can download the forms completed by the students to evaluate our active-learning approach (in Spanish)
1st Experiment
(July 2005)

PreTest
Evaluation of the learning approach

2nd Experiment
(December 2006)

PreTest
Test1
Test2
Evaluation of the learning approach

Case Study

Simple Drawing Editor

Here you can download a Eclipse Project with the source code from the case study employed during the role-play sessions: a drawing editor. There is a Java package for each role-play session. Inside them ther are at least two packages, one for the "Before Design" and one for the "After design"


Download the Source Code

This file last modified Monday December 10, 2007