33
What’s New in Computer Science Education? A Report on the 2005 ACM/SIGCSE Meeting

What’s New in Computer Science Education?

  • Upload
    cachez

  • View
    44

  • Download
    2

Embed Size (px)

DESCRIPTION

What’s New in Computer Science Education?. A Report on the 2005 ACM/SIGCSE Meeting. ACM/SIGCSE Meeting. Where: St. Louis When: February 23-26, 2005 Papers: http://db.grinnell.edu/sigcse/sigcse2005/Program/program.asp. Major Themes. Women in computing Image processing - PowerPoint PPT Presentation

Citation preview

Page 1: What’s New in Computer Science Education?

What’s New inComputer Science Education?

A Report on the2005 ACM/SIGCSE Meeting

Page 3: What’s New in Computer Science Education?

Major Themes

• Women in computing

• Image processing

• Writing game software

• Robotics

• Approaches to introductory programming

Page 4: What’s New in Computer Science Education?

Women and Computing

• A panel on experiences at different colleges

• A session with four papers

• A keynote address by Maria Klawe, past president of the ACM and Dean of Engineering at Princeton

Page 5: What’s New in Computer Science Education?

Image Processing

• In secondary school (Scion)

• For training teachers in Georgia (Georgia Tech)

• In CS1 (Swarthmore)

Page 6: What’s New in Computer Science Education?

Writing Game Software

• Games and CS education

• A concentration within the CS curriculum

Page 7: What’s New in Computer Science Education?

Robotics

• A session with four papers

• A workshop on LEGO Mindstorms

Page 8: What’s New in Computer Science Education?

Introductory Programming

• Debate on objects early

• Rigor (algorithms)-first approach

• The use of environments, microworlds, and toolkits

• The ACM Java Task Force

Page 9: What’s New in Computer Science Education?

The ACM Java Task Force

• Created in 2004 to study problems with teaching Java in intro courses

• Solicited toolkits as proposed solutions or learning aides

• Published a draft of a report on the problems and a tentative synthesis or distillation of solutions

Page 10: What’s New in Computer Science Education?

Problems With Teaching Java

• High-level issues– Scale– Instability– Execution speed– Textbooks and environments

Page 11: What’s New in Computer Science Education?

Problems With Teaching Java

• Language issues– public static void main(String[] args)– Exceptions– Separation of interface and implementation– Wrapper classes– Parameterized classes– Enumerated types– Coding preconditions– Iterator syntax

Page 12: What’s New in Computer Science Education?

Problems With Teaching Java

• API issues– Simple input mechanism– Graphics model– GUI model– Event model

Page 13: What’s New in Computer Science Education?

Solutions

• Packages for – console I/O– modal dialog I/O– graphics

• A program package for writing applications/applets using these three I/O styles

Page 14: What’s New in Computer Science Education?

Console I/O

• The package acm.io includes an IOConsole class that supports input and output of basic data types

• It can be used with or without the acm.program package

Page 15: What’s New in Computer Science Education?

import acm.io.*;import java.awt.*;import javax.swing.*;

public class CircleArea{

public static void main(String[] args){ JFrame frame = new JFrame(); IOConsole console = new IOConsole(); frame.getContentPane().add("Center", console); frame.setSize(500, 300); frame.setVisible(true); console.println("This program displays the area of a circle"); int radius = console.readInt("Enter the radius: "); double area = radius * radius * Math.PI; console.println("The area is " + area); } }

Example with IOConsole

Page 16: What’s New in Computer Science Education?

import acm.io.*;import java.awt.*;import javax.swing.*;

public class CircleArea{

public static void main(String[] args){ IODialog dialog = new IODialog(); dialog.println("This program displays the area of a circle"); int radius = dialog.readInt("Enter the radius"); double area = radius * radius * Math.PI; dialog.println("The area is " + area); } }

Example with IODialog

Page 17: What’s New in Computer Science Education?

Graphics

• The package acm.graphics includes– double-valued coordinates– A hierarchy of shapes that reflect the

options available in the Graphics class but that maintain their state

– A canvas that refreshes automatically

Page 18: What’s New in Computer Science Education?

acm.graphics Hierarchy

GCanvas GCanvasMenuBar

GObjectGTurtle

GCompound

GArc

GPPen

GDimension GRectangle

GImage GLabel GLine GOval GRect GPolygon

GPoint

All GObjects accept mouse listeners

Page 19: What’s New in Computer Science Education?

import acm.graphics.*;import java.awt.*;import javax.swing.*;

public class HelloWorld extends JFrame {

public HelloWorld(){ GCanvas gc = new GCanvas(); GLabel label = new GLabel("Hello world!"); label.setFont("Helvetica-bold-72"); label.setColor(Color.red); gc.add(label, 50, 100); getContentPane().add("Center", gc); setSize(500, 300); }

public static void main(String[] args){ new HelloWorld().setVisible(true); }}

Example With Graphics

Page 20: What’s New in Computer Science Education?

The Output

Page 21: What’s New in Computer Science Education?

acm.program Package

• Encapsulates the main method so it’s not a distraction

• Can run a program as an application or an applet with no changes

• Backwards compatible with JDK 1.1 for older browsers

• Includes standard menus for printing an interaction and accepting input from files

Page 22: What’s New in Computer Science Education?

acm.program Hierarchy

Program

ConsoleProgram DialogProgram GraphicsProgram

java.applet.Applet

Page 23: What’s New in Computer Science Education?

import acm.io.*;import java.awt.*;import javax.swing.*;

public class CircleArea{

public static void main(String[] args){ JFrame frame = new JFrame(); IOConsole console = new IOConsole(); frame.getContentPane().add("Center", console); frame.setSize(500, 300); frame.setVisible(true); console.println("This program displays the area of a circle"); int radius = console.readInt("Enter the radius: "); double area = radius * radius * Math.PI; console.println("The area is " + area); } }

Example with IOConsole

Page 24: What’s New in Computer Science Education?

import acm.program.*;

public class CircleArea extends Program{

public static void main(String[] args){ new CircleArea().start(args); }

public void run(){ println("This program displays the area of a circle"); int radius = readInt("Enter the radius: "); double area = radius * radius * Math.PI; println("The area is " + area); } }

Example with Program

Uses the host system’s terminal

Page 25: What’s New in Computer Science Education?

import acm.program.*;

public class CircleArea extends Program{

public void run(){ println("This program displays the area of a circle"); int radius = readInt("Enter the radius: "); double area = radius * radius * Math.PI; println("The area is " + area); } }

Example with Program

Omit main method to simplify

Page 26: What’s New in Computer Science Education?

import acm.program.*;

public class CircleArea extends ConsoleProgram{

public void run(){ println("This program displays the area of a circle"); int radius = readInt("Enter the radius: "); double area = radius * radius * Math.PI; println("The area is " + area); } }

Example with ConsoleProgram

Extend ConsoleProgram to get a console window with File and Edit menus

Page 27: What’s New in Computer Science Education?

import acm.program.*;

public class CircleArea extends DialogProgram{

public void run(){ println("This program displays the area of a circle"); int radius = readInt("Enter the radius: "); double area = radius * radius * Math.PI; println("The area is " + area); } }

Example with DialogProgram

Extend DialogProgram to get I/O with modal dialogs

Page 28: What’s New in Computer Science Education?

import acm.program.*;

public class CircleArea extends DialogProgram{

public void run(){ IOModel io = this.getConsole(); io.println("This program displays the area of a circle"); int radius = io.readInt("Enter the radius: "); double area = radius * radius * Math.PI; io.println("The area is " + area); } }

Make It More Oopy-Like

Both IOConsole and IODialog implement IOModel

Page 29: What’s New in Computer Science Education?

import acm.graphics.*;import java.awt.*;import javax.swing.*;

public class HelloWorld extends JFrame{

public HelloWorld(){ GCanvas gc = new GCanvas(); GLabel label = new GLabel("Hello world!"); label.setFont("Helvetica-bold-72"); label.setColor(Color.red); gc.add(label, 50, 100); getContentPane().add("Center", gc); setSize(500, 300); }

public static void main(String[] args){ new HelloWorld().setVisible(true); }}

Example With Graphics

Page 30: What’s New in Computer Science Education?

import acm.graphics.*;import acm.program.*;

public class HelloWorld extends GraphicsProgram{

public void run(){ GLabel label = new GLabel("Hello world!"); label.setFont("Helvetica-bold-72"); label.setColor(RED); double x = (getWidth() - label.getWidth()) / 2; double y = (getHeight() - label.getAscent()) / 2; add(label, x, y); } }

Example With GraphicsProgram

Page 31: What’s New in Computer Science Education?

import acm.graphics.*; import acm.program.*;

public class DrawTurtleFlower extends GraphicsProgram{

public void run(){ GTurtle turtle = new GTurtle(); add(turtle, getWidth() / 2, getHeight() / 2); turtle.penDown(); for (int i = 0; i < 36; i++){ for (int j = 0; j < 4; j++){ turtle.forward(100); turtle.left(90); } turtle.left(10); } } }

Turtle Graphics Example

Can be decomposed with methods or by subclassing

Page 32: What’s New in Computer Science Education?

Ouput

Page 33: What’s New in Computer Science Education?

GUI Programs?

• The task force could not agree on a common framework

• Recommends using a toolkit like BreezySwing

• But it would be nice to have a standard GUIProgram class