7
Using Text, Games, and GUIs to Teach Java Barb Ericson Georgia Tech April 2006

Using Text, Games, and GUIs to Teach Java

  • Upload
    gafna

  • View
    28

  • Download
    2

Embed Size (px)

DESCRIPTION

Using Text, Games, and GUIs to Teach Java. Barb Ericson Georgia Tech April 2006. Why These Topics?. Text Basic text processing is important in computing Women find playing with language fun Students like to produce web pages Games Boys often come to computing from a interest in games - PowerPoint PPT Presentation

Citation preview

Page 1: Using Text, Games, and GUIs to Teach Java

Using Text, Games, and GUIs to Teach Java

Barb Ericson

Georgia Tech

April 2006

Page 2: Using Text, Games, and GUIs to Teach Java

Why These Topics?

• Text– Basic text processing is important in computing– Women find playing with language fun– Students like to produce web pages

• Games– Boys often come to computing from a interest in

games– Both boys and girls can enjoy creating games

• GUIs– Students find graphics and graphical user interfaces

motivating– Practical applications of inheritance and interfaces

Page 3: Using Text, Games, and GUIs to Teach Java

Working with Text• Parameter passing

– Write a form letter and pass in details such as the name and address to customize the letter

• Conditionals– Do a form letter with two different results based on some condition– Create a Web page with a different comment based on the current

temperature• Iteration and Conditionals

– Output the lyrics to a song where something changes each time through the song

• 99 Bottles of beer on the wall– Parse delimited strings

• Read text and create objects from the text– Search a web page for text to pull out of it – Search a program for text to change and change it

Page 4: Using Text, Games, and GUIs to Teach Java

Working with Text

• Arrays and Classes– Create a fortune teller that randomly picks a fortune

from an array of fortunes– Create a random sentence generator that picks parts

from arrays of nouns, verbs, and phrases

• Lists– Create a fortune teller and after each fortune has

been picked remove it from the list– Create a random sentence generator and remove

picked items as you pick them from the lists

Page 5: Using Text, Games, and GUIs to Teach Java

Games

• Simple games– NumberGuess– Hangman– Breakout

• Conditionals– GuessWho

• Arrays– Battleship– Tic-Tac-Toe– Checkers

Page 6: Using Text, Games, and GUIs to Teach Java

GUI

• You can teach with awt or Swing components– But students may find this difficult– See the slides in the GUI folder– http://java.sun.com/docs/books/tutorial/uiswing/index.html

• An alternative is the Java Task Force libraries– http://www-cs-faculty.stanford.edu/~eroberts/jtf/– Simplifies graphical user interface programmingSee tutorial at http://www-cs-faculty.stanford.edu/~eroberts/jtf/tutorial/index.html

Demos at http://www-cs-faculty.stanford.edu/~eroberts/jtf/demos/index.html

Page 7: Using Text, Games, and GUIs to Teach Java

Assignment Ideas

• Nifty Assignments from SIGCSE– http://nifty.stanford.edu/

• 2006– Book Number - deals with the ISBN, International

Symbolic Book Number, which involves error detection. – Breakout – create the arcade game breakout with the

Java Task Force libraries– Dancing Turtles – create a lead and follower turtle and

implement a conga line.

• 2005– Grid Plotter – teach about 2-D arrays and looping – Name Surfer – Search Social Security Data for Names