Download Using Text, Games, and GUIs to Teach Java - Coweb

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
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
– Both boys and girls can enjoy creating games
• GUIs
– Students find graphics and graphical user interfaces
motivating
– Practical applications of inheritance and interfaces
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
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
Games
• Simple games
– NumberGuess
– Hangman
– Breakout
• Conditionals
– GuessWho
• Arrays
– Battleship
– Tic-Tac-Toe
– Checkers
GUI
• You can teach with awt or Swing components
– But students may find this difficult
– See the slides in the GUI folder
• An alternative is the Java Task Force libraries
– http://www-cs-faculty.stanford.edu/~eroberts/jtf/
– Simplifies graphical user interface programming
See 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
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