CSC 216/s08/youthful aspirations

From Expertiza_Wiki
Jump to navigation Jump to search

Formatting Resources

Formatting Help Guide from MetaWiki

Mad Libs(For J2SE Students)

The problem: Java lectures tend to be boring.

Basically no matter what you do to try to lecture to students, their attention span is going to be pretty limited and within 30s-40s they are no longer paying attention and will only later respond when they hear cues of silence or confusion. Our idea is to force student participation via electro shock therapy... or whimsical humor which ever is the easiest to implement.

Participants and props

All students are capable of participating... they simply will shout out what they would like to see written on the board.

Props

  • Projector / Scree that is large enough for all students to currently view the source code on the screen.
  • Laptop / Desktop to project the code and options.
    • Operating system with presentation software.
    • Presentation software.
    • Source code relevant to the lesson you are teaching.

The Game

Very similar to how the original Mad Libs game is done you first examine the source code you plan to work with.


       class myfirstjavaprog
       {  
               public static void main(String args[])
               {
                  System.out.println("Hello World!");
               }
}

Now you will pull out the key elements to the program which are:

  • Class Name
  • String to be displayed


At this point you will display to your students the choices they can name and wait for them to shout out answers. For this demo let us say Cocaine and Charlie Murphy.So:

  • Class Name = Cocaine
  • String = Charlie Murphy

Now you will put these into the source code on screen making it look like this:

       class Cocaine
       {  
               public static void main(String args[])
               {
                  System.out.println("Charlie Murphy");
               }
}

Next you can compile the code on screen and show the relation between the content they generated and how it modifies the code and its output.

Examples