CCSCNE98 Panel: How To Teach CS1 In Java


The goal of this panel was to go bypass the question of "To Java Or Not To Java" but address HOW to use Java in CS1.

My Statement:

Faculty may choose Java as a CS1 language for reasons other than its object-oriented character. Once Java is selected, there is a strong impetus to use the object-oriented, rather than the procedural, paradigm. At the CS1 level, that means that the way to get a task done is to create (or find) an object of a class whose behavior includes carrying out the task and then send the object a message. If no such class exists, the programmer must define one. This perspective explains our approach: class definitions early, focus on behavior and responsibility, and use of composition rather than inheritance.


Below are three slides that I used in my presentation. Beyond repeating the above statement, my point was that we -- as individuals and a community of educators -- have far more experience teaching procedural programming than OOP and that there is naturally a learning curve. New issues and challenges arise, old ones reappear in changed form. This does not mean that we can't take an OO approach in CS1 but it means we have some learning to do. As an example, I discussed the difficulties beginning students have in knowing what variables to use where (parameters, locals, instance variables).



My Experience: O-O vs. Procedural

 

O

 

OOP

 

 

OOD

 

OOP: ProgrammingCS1, OOPCS1

CS 1 Gotcha #357:
Where Does The Data Come From?

 

Procedural Choices:

Parameter

Input

Global

 

O-O Choices

Parameter

Instance Variable

Input

Class (static) Variable

Data visible from another class