CSC 216/s08/cultivate virtue
Formatting Resources
Formatting Help Guide from MetaWiki
Alphabet Soup
The goal is to teach students about object oriented concepts and multi class/method architectures in programming Java.
The exercise will include each student in the class. 26 of the students will need access to either letter stamps or dry erase markers.
The class will create a sentence construction package which will be used for several 'ad lib' type exercises. Numbers allowing 26 students will each be a letter. Preferably each person who is a letter has access to a stamp of their letter, another option would be to simply use a dry erase board for writing on. 7 students will each represent classes pertaining to noun, verb, adjective, adverb, preposition, conjunction, and interjection. One person will be the overall package 'driver.' It is this person's job to say, "Alright, I need a noun, I will call my noun class," or "I need a verb, I'll make a call to my verb class." Upon being called, the noun class person then comes up with a word that fits his/her bill (ie a noun) and makes appropriate calls to the people of the letter classes. The letter classes, upon being called, write or stamp their letter in the next position on the board.
A slightly different version, which makes use of methods, and a slightly smaller class/fewer participating students would group letters into one class with multiple methods. Fore example, one student would be the vowel class and would have the methods printA, printE, printI, printO, printU (we'll leave y to the consonants for this exercise). And similar groupings of letters would be used for other students, such as b,c,d,f,g or some appropriate amount for the number of participating students. Then when the noun class decided to print 'hobgoblin' he/she would call a class .printH then vowels.printO, and so on and so forth.
While not perfect, this setup allows students to see how they can create classes with methods that other classes can also use. It should help break the "I'll use one class with one main method" that many students carry.