1 / 33

What’s New in Computer Science Education?

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

cachez
Télécharger la présentation

What’s New in Computer Science Education?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. What’s New inComputer Science Education? A Report on the 2005 ACM/SIGCSE Meeting

  2. ACM/SIGCSE Meeting • Where: St. Louis • When: February 23-26, 2005 • Papers: http://db.grinnell.edu/sigcse/sigcse2005/Program/program.asp

  3. Major Themes • Women in computing • Image processing • Writing game software • Robotics • Approaches to introductory programming

  4. 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

  5. Image Processing • In secondary school (Scion) • For training teachers in Georgia (Georgia Tech) • In CS1 (Swarthmore)

  6. Writing Game Software • Games and CS education • A concentration within the CS curriculum

  7. Robotics • A session with four papers • A workshop on LEGO Mindstorms

  8. Introductory Programming • Debate on objects early • Rigor (algorithms)-first approach • The use of environments, microworlds, and toolkits • The ACM Java Task Force

  9. 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

  10. Problems With Teaching Java • High-level issues • Scale • Instability • Execution speed • Textbooks and environments

  11. 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

  12. Problems With Teaching Java • API issues • Simple input mechanism • Graphics model • GUI model • Event model

  13. Solutions • Packages for • console I/O • modal dialog I/O • graphics • A program package for writing applications/applets using these three I/O styles

  14. 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

  15. Example with IOConsole 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); } }

  16. Example with IODialog 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); } }

  17. 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

  18. acm.graphics Hierarchy GCanvas GCanvasMenuBar GPoint GDimension GRectangle GTurtle GCompound GObject GPPen GArc GImage GLabel GLine GOval GRect GPolygon All GObjects accept mouse listeners

  19. Example With Graphics 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); } }

  20. The Output

  21. 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

  22. acm.program Hierarchy java.applet.Applet Program ConsoleProgram DialogProgram GraphicsProgram

  23. Example with IOConsole 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); } }

  24. Example with Program 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); } } Uses the host system’s terminal

  25. Example with Program 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); } } Omit main method to simplify

  26. Example with ConsoleProgram 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); } } Extend ConsoleProgram to get a console window with File and Edit menus

  27. Example with DialogProgram 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); } } Extend DialogProgram to get I/O with modal dialogs

  28. Make It More Oopy-Like 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); } } Both IOConsole and IODialog implement IOModel

  29. Example With Graphics 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); } }

  30. Example With GraphicsProgram 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); } }

  31. Turtle Graphics Example 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); } } } Can be decomposed with methods or by subclassing

  32. Ouput

  33. 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

More Related