CSC 216/s08/youthful aspirations: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 21: Line 21:
===The Game===
===The Game===


Very similar to how the original Mad Libs game is done you first examine the source code you plan to work with.<br/>
Very similar to how the original Mad Libs game was done, you first examine the source code you plan to work with.<br/>




<tt>
<tt>
         class myfirstjavaprog
         public class myfirstjavaprog
         {   
         {   
                 public static void main(String args[])
                 public static void main(String args[])
Line 39: Line 39:
<br/>
<br/>


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:
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
*Class Name = Cocaine
*String = Charlie Murphy<br/>
*String = Charlie Murphy<br/>
Line 45: Line 45:
Now you will put these into the source code on screen making it look like this:
Now you will put these into the source code on screen making it look like this:
<tt>
<tt>
         class Cocaine
         public class Cocaine
         {   
         {   
                 public static void main(String args[])
                 public static void main(String args[])

Revision as of 20:31, 26 March 2008

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 when lecturing to students, their attention spans are going to be fairly limited and within 30s-40s they are no longer paying attention. Inherently, these poor, utterly useless souls will only respond when they hear cues of awkward silence or mass 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 / Screen that is large enough for all students to 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 was done, you first examine the source code you plan to work with.


       public 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:

       public 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