14
Some directions for studying the "objects first" question

Some directions for studying the "objects first" question

Embed Size (px)

Citation preview

Page 1: Some directions for studying the "objects first" question

Some directions for studying the "objects first" question

Page 2: Some directions for studying the "objects first" question

Approaches to teaching OO in CS 1 and 2

Graduated exposure with scaffolding (Buck & Stucki, SIGCSE 2000)

Complex system that can be extended with class definitions (Nevison & Wells, ITiCSE 2003)

Emphasis on early analysis and design, coverage precedes procedural constructs; tool translates class diagrams to code (Alphonce & Ventura, ITiCSE 2003)

Conceptual level first with UML; code with objects first, then internal construct of classes (Bennedsen & Caspersen, SIGCSE 2004)

Object-centered design (Adams & Frens, SIGCSE 2003)

Page 3: Some directions for studying the "objects first" question

Buck & Stucki

Design at the beginning is premature

Process1. Start with code skeletons and internal specifications2. Students write code in skeletons3. Incrementally, structure is removed and higher-level

specifications are offered

Authors claim Bloom’s taxonomy indicates an initial need to start with low-level constructs (e.g. words before sentences before paragraphs)

Page 4: Some directions for studying the "objects first" question

Nevison & Wells

Students need term-long case-studies to motivate design and programming

Process1. Use complex system (e.g. elevator simulation) as case

study throughout the term2. Students write classes that specify behavior of objects

in system (e.g. write code that moves an elevator)3. Students learn more about system, extend functionality

Cite use of other case studies including the Marine Biology Simulation

Page 5: Some directions for studying the "objects first" question

Alphonce & Ventura

Emphasize design over code and syntax

Use code-generating tools based on design diagrams

Non-trivial examples

Uses UML and design patterns

Similar to Model-First approach by Bennedsen & Caspersen, who note a passing rate of 79% compared to 52% under previous approach

Page 6: Some directions for studying the "objects first" question

Adams & Frems

Object-centered Design: Students need a gradual approach to learning OO methodology

Process (all within CS 1)1. Phase I: Objects early---uses objects of predefined

classes2. Phase II: Classes and methods---start with class

methods, interleave control structures3. Phase III: Inheritance

Anecdotal evidence of office hour visitations; fewer comments of “I don’t know where to start”

Page 7: Some directions for studying the "objects first" question

Overview of approaches

All emphasize OO concepts from the beginning

Complex term-long cases vs. simple examples

Model-based vs. code-based

Anecdotal or informal evaluation (if any)

No detailed principles for motivating approach

Page 8: Some directions for studying the "objects first" question

Using a controlled study

Method

Establish objective measures of student learning

Conduct multiple approaches

Control for confounding variables statistically or through random assignment

Drawbacks

Expensive or impractical

Results may not generalize

Does not explain why result was achieved

Page 9: Some directions for studying the "objects first" question

Alternate approach

Identify common misconceptions

Develop mental models based on misconceptions

Develop questions for diagnosing misconceptions

Use mental models to create examples and activities that target misconceptions

Conduct small experiments for assessing effectiveness of examples or activities

Page 10: Some directions for studying the "objects first" question

Possible mental models

Objects are useful for qualifying the method; there is no state associated with an object.

A class is written for one object. A state is associated with the class-object pair. Additional objects belonging to the class don’t make sense or they all share the same state.

Each object has its own state. A class is written as a template for creating objects and describing their behavior.

Page 11: Some directions for studying the "objects first" question

Diagnostic questions

Create multiple objects belonging to a class, each with different states; ask students to trace code and predict behavior– Does it make a difference if they need to trace

through the methods?– What diagrams do they create for tracing code? Do

they have a state for each object? When writing a class to a specific object, do they

try to reference the object name in the class definition?

Page 12: Some directions for studying the "objects first" question

Teaching examples: which ones work?

Standard input object

File input objects

String objects

Temperature object– Object holds temperature– Methods produce values for other units

MarbleJar object– Simulates marble jar with draw and add methods

Turtle graphics objects

Page 13: Some directions for studying the "objects first" question

How do we start?

Investigate misconceptions

Protocol Analysis– K. A. Ericsson and H. A. Simon– “Please think aloud!”

Conceptual inventories– Frequency profiles of misconceptions/mental

models Mini-experiments

Page 14: Some directions for studying the "objects first" question

Conferences and Journals

SIGCSE (ACM SIG on computer science education)

ITiCSE (international conference)

Computer Science Education (journal)

International Conference of the Learning Sciences

Journal of the Learning Sciences

Cognitive Science (conference and journal)