MBCS Role Play OverviewVersion 1.1Page 1 of 6

MBCS Role Play Information

Introduction

When we were first confronted with the Marine Biology Case Study (MBCS), Steve Andrianoff and I debated how we could present this material to students and teachers. After some thought, we hit upon this exercise. We have used it with both teachers and students with great success. We hope that you can do the same.

We believe that one of the best ways to emphasize the interobject communication of Part II of the APCS Marine Biology Case Study is through the use of role playing. The “scripts” for the roles are included in a companion document. This document discusses some tips about how to use those scripts most effectively in the classroom.

Instructors are welcome, encouraged even, to use these scripts to help students and are requested to send feedback (positive, negative, suggestions for changes, etc.) to . There are no restrictions on the distribution of these documents except that authorship credit must be given where it is due.

How the Role Play Is a Compromise

MBCS contains seven new classes (Display, Environment, Fish, Neighborhood, Position, RandGen, and Simulation) along with three of the standard AP classes (apstring, apvector, and apmatrix) and a main program (in fishsim.cpp). The standard data file distributed with the case study (fish.dat) has twelve fish contained in the “ocean”.

The primary goal of the role play is to expose students to the idea of intercommunicating objects in general, and to the classes of MBCS in particular. The scripts were designed to be usable in a single class period (see notes below about timing.) We have attempted to make those interactions that are present in the role play accurately reflect the actions of MBCS, but in the interests of time, we have simplified some of the MBCS interactions. In essence, we strive to “tell the truth, but not the whole truth”.

The scripts given cover only six of the new classes (Position is removed), one of the AP classes (apmatrix – though it is called just a matrix), and a main program. There are four roles for fish, however; three represent actual fish and one represents the (infamous) EmptyFish.

Timing

“Past performance is no guarantee of future results.” Everyone who has done this has had a different group of people doing this under different circumstances. At Bonaventure, we have run through this at least four times with the duration of the exercise ranging from forty-five minutes to two and a half hours. The variation is primarily accounted for by the amount of commentary done as the role play progresses (“time outs”, if you will taken part-way through), and by the mental quickness of the students involved.

Last fall, my CS2 (APCS AB-type) students who had one prior lecture about Part II of the case study, were able to run through the entire exercise in 70 minutes with no additional commentary. Last spring, I was able to do it in 58 minutes, but it was very tight (we had a fifty-minute class period with a ten-minute gap between classes). Proper preparation of the students (“tomorrow we will be very pressed for time; we will probably begin class a few minutes early; I need everyone’s cooperation”) in advance can really help.

Mechanics – Advance Prep

Before I run through the role play, I assign the roles to appropriate students -see below regarding casting. (Assigning the roles the day before the role-play activity and having the students read over their assigned class code might help move things along.) I put the “Cast of Characters” on the blackboard in an easy-to-read format, e.g.

Notes printed: 11/5/2018

MBCS Role Play OverviewVersion 1.1Page 1 of 6

  • Environment – Nancy
  • Display – Ronald
  • Matrix – Barbara
  • Simulation – George
  • main program – Bill
  • first Fish – Hermione
  • second Fish – Harry
  • third Fish – Ginny
  • EmptyFish – David
  • RandGen – Steve
  • Neighborhood - Gail

Notes printed: 11/5/2018

MBCS Role Play OverviewVersion 1.1Page 1 of 6

Harry
Hermione
Ginny

If the students don’t know each other well or if visibility is a problem, it can also be helpful to preprint the “Cast of Characters” and distribute these to all students. (Some people have found this list to be helpful even after the completion of the role playing exercise.) Nametags with LARGE labels, e.g. “George/Simulation” can help. Some people have used large sections of poster board for this purpose. I also prep the scripts for quick dissemination. (Be sure to have three such scripts for the Fish.) Finally, on the board, I have a picture of an ocean with three fish drawn in: Alice, Bob, and Carol. These fish are positioned so that the call to AllFish() will NOT produce them in alphabetical order. I also choose to put at least one on the border and to have two touching. As a general rule, a 3x4 ocean is probably enough for three fish. One possible ocean is shown at the right. (Note that some people like to erase this ocean after the simulation begins; this can help emphasize the private nature of the data. Others prefer to keep it up for reference. Ed note: Still others update it as they go, but this seems to subvert the purpose of the Display class, so I don’t recommend it.)

I also reserve a special part of the blackboard for the Display object and warn the actor to start “high up” on the screen. (Blackboards at Bonaventure don’t scroll as well as computer screens! ;-) I also make sure that each Fish knows which one it is (and where).

Each student is instructed to read his/her entire script and to realize that they will perform only one of those things at a time. Be sure to clarify the “method of return” for Environment::AllFish() if the script has not already been modified accordingly. [The script as distributed mentions that the list returned from AllFish() might be transmitted orally, on the blackboard, or on paper; the facilitator needs to choose among these. Ideally, the facilitator would modify the script in advance to reflect the desired choice.]

The person playing the role of the main program is instructed to begin.

In a time-tight situation, I intervene as little as possible, generally doing so only to correct errors or to minimize duplicated work.

(Extra hint: It can make the facilitator’s life a lot easier if s/he has a copy of each script!)

A Note on Method Invocation

One of the more difficult tasks for some students is figuring out how to make a request of another object. At Bonaventure, this difficulty is not a problem with this material because the students have generally participated in or witnessed other role playing exercises written by the same people. If your students have not had similar experiences, it is worthwhile to take some time to “teach” them your role playing “syntax”. We keep ours simple. For example, suppose that we have the cast above and the main program wants the Display to Show the data (see steps 4 or 6b). Then an appropriate statement for Bill to make would be, “Ronald, please SHOW. Here’s Nancy to help you.” When a method is complete, we have the actor say either, “I am done.”, or simply state the appropriate value. Note that no name is used; the caller is anonymous – though known – and presumed to be paying attention.

Mechanics – Ongoing

There are several points to consider/emphasize as you go.

  • Some people like to indicate flow of control through the use of an artifact, e.g. a nerf ball held by the object currently executing, or a jester’s cap, etc. If you are doing so, then one actor should pass the artifact to another as “control” is passed through a request. Note that furniture configurations can play a role in the success of this idea!
  • Some people like to maintain a call stack of some sort. Personally, I’m not sure how to make this work (some objects will be in the stack multiple times!), but if anyone can make it work well, we’d love to hear about it.
  • Objects must be addressed by their names, not by their roles, e.g. “Nancy, can I please have AllFish?”, not “Environment, can I please have AllFish?” [Note that Nancy is the actor’s name, i.e. the name of the object. Environment is the role, i.e. the name of the class.] (Editor’s note: this error was unfortunately common among student answers on the 2001 APCS exam – and not just on the case study question! It is my opinion that this error was more common this year than in either of the past two, perhaps due to the greater number of questions involving interacting classes.)
  • If there is space on the back of nametags/poster board, this space can be effectively used for the storage of private data; it is utilitarian AND it emphasizes that the data is private to that object/individual.
  • In a similar, if somewhat contradictory vein, it can be interesting for participants to be able to view the Neighborhood’s and/or Matrix’s data as it is being updated. It can be “shown” at the blackboard as long as it is emphasized that the data is private. DON’T LET ANY OF THE ACTORS LOOK AT IT, HOWEVER – unless, of course, it is their data. (The Enviroment will be sorely tempted.)
  • There are three Fish and THEY are what is stored in the matrix, e.g. Hermione, Harry, and Ginny – or whoever is playing those roles, not A, B, and C.
  • Since the role is so “active”, some people like to have the Environment in front of the group.
  • (Unauthorized) shortcutting is NOT allowed. After a bit, some actors/objects will try to bypass intermediaries “for efficiency”. This should not be allowed to happen. In particular, there is a tendency for the Environment to bypass the Matrix.
  • Student actors will make errors. It is important to correct them politely, but firmly when this does happen.

Mechanics – Ending

I usually tell the class that we will simulate seven steps. In practice, I’ve never done even a complete second one. Sometimes, we have gone through a second pass but with significant short-cutting. (Hey, we never said that we always practice what we preach!) The ending is relatively unimportant, though my students report that it is very beneficial to “debrief” the experience in the next class.

Debriefing

During the debriefing, it should be emphasized that the role play is a simplification. Some of the simplifications of the role play can lead to student misunderstandings later. These can be avoided if you are alert to them. Things to discuss during the debriefing:

  • Importance of name of object vs. name of class – particularly for Fish (i.e. we have only one Fish class, but three – or more – Fish objects).
  • There are also (at least) three “names” for each fish. One is the name of the object (e.g. Harry, Hermione, Ginny, EmptyFish); one is the ID of the object (e.g. 1, 2, 3) and one is the “ShowMe” name of the object (e.g. A, B, C).
  • Behavior of IsEmpty() when query involves a cell that is “out of bounds”. There is a great tendency for students to short-circuit this call and also to claim that the answer is “intuitively wrong”. Regardless of one’s intuition, the role play is faithful to the actual code of MBCS in this regard.
  • In the role play, Fish do know their own location. In the real MBCS, they have a Position object that takes care of this. This is one of the key simplifications of the role play.
  • In a similar vein, some of the private functions of the real MBCS (e.g. Fish::EmptyNeighbors() or Fish::AddIfEmpty() ) have been “folded in” to other functions within the context of the role play.
  • In the real MBCS, there are actually many copies of some of the fish, particularly EmptyFish. The role play may lead students to believe otherwise. This is also true of the RandGen object(s).
  • In the real MBCS, each fish creates its own neighborhood. The role play implies that all fish share one, albeit one that is repeatedly constructed and destroyed.
  • There are numerous simplifications/name changes involving the role played by the Matrix.

Note: If each student has a copy of the “Cast of Characters”, the discussion often goes more smoothly during the debriefing.

Casting

Who is chosen to play which role can have a major effect on the time needed to complete the exercise. Some tips are below:

  • main – This role is quite easy and can be played by any student who will stay on task.
  • Simulation – Another quite easy role.
  • RandGen – Again, an easy role, though not one for someone who thinks too much when asked for a random number. With a small number of participants, this is a good role for the facilitator to assumeespecially since the facilitator will be able to “randomly choose” a number that will allow calls to AllFish() to generate lists with different orders after the fish move.
  • EmptyFish – Definitely the simplest role, albeit one that has many speaking lines (each of them “false”). Another good role for the facilitator if there aren’t many people around.
  • Neighborhood – This is also an easy role; note that it enters the picture relatively late in the game.
  • Display – This role is tricky and should be played by a student who is relatively mentally agile. It is not often “on duty”, though. As this is the only role that cannot be played from a student’s chair, it should not be given to a shy student.
  • Environment – The “starring” role; it is best played by a bright student who will “stick with it” for an hour.
  • Matrix – Like Environment, but a bit more low-key. Still needs a bright student.
  • Fish – The first Fish to be processed will need to be played by a strong student, but the other two Fish can be played by less bright students who can learn from what the first student does.

I cast by trying to find four bright students to play the roles of Display, Environment, Matrix and first Fish. I don’t worry too much about the rest of the casting. If the class size is small, I assume the roles of EmptyFish, RandGen, and main program (in that order). I will also let Neighborhood and Simulation “double up”. (I’ve never used it with fewer than seven students. I might double up the second and third Fish in that case, or assume the role of the third Fish myself.)

A Final Note

While we developed this exercise for ourselves (and our students), we hope that you find it useful, too. All we ask is that if you use it, you give us feedback on it.

The role play itself has been tested several times in several different forums. As of 7/6/01, these notes have been minimally field tested. If you find errors of omission (or of commission) within either of them, please send corrections, comments, etc. to .

We have had great success with this exercise as have several high school teachers that we know of. We hope that you do, too.

--david levine and steve andrianoff, st. bonaventure university, 7/6/01

P.S. Links to all of the role play documents can be found at

Notes printed: 11/5/2018