Welcome to C212/A592!

  http://www.cs.indiana.edu/classes/c212/

  Adrian German (dgerman@indiana.edu)

  10th and Woodlawn 

  http://silo.cs.indiana.edu:8346/cgi-bin/sum2014/schedule

  http://www.cs.indiana.edu/~dgerman/spr2014/images/house/

  Wait until this is indexed on the website. 

  On the paper I gave you please write:

  (a) name and username, major

  (b) reasons for taking this class
  
  (c) expectations; have you taken it before?

  (d) are you on the waiting list or in the class already?

  (e) do you have a silo account? Are you in OnCourse? 

  By OnCourse I mean can you see: C212-11819

  I will teach the lectue and will be in two other labs.

  Daniel Brady will be assisting with the class. 

  Hersh Patel and Dave Earle whom you will meet later. 

  This class will be taught in the Java programming language. 

  More questions for you: 

  (f) is this your first programming class? 

  If not, what is your background/experience? 

  What other languages do you know? 
  
  Favorite programming language: _____________

  Do you know Java? If so how well? 

  (g) What would you like to be able to do at the end of 
      this class to feel accomplished? 

  ----

  Attendance

  Lab Assignments

  Homework Assignments

  Midterm Exam

  Final Exam 

  ---

  In this class you need to learn to plan well. 

  In this class you need to learn to execute plans with patience. 

  It's important to embrace a test-driven philosophy. 

  --

  Let's start writing some code. 

  1. Open Notepad

  2. In Notepad please write

class Program { 

  public static void main(String[] args) {

    System.out.println( 1 );

    System.out.println( 3 + 5 );

    System.out.println( 4 / 5 );

    System.out.println( 4 < 5 );

  //SB221.lindsay.says( " 4 / 5 " ); 
    
  }
}

  3. Save this on the Desktop. 

     Save it as Program.java 

     Windows is not case sensitive but Unix and you and Java are. 

  4. Open a command prompt (cmd.exe) window. 

  5. Type dir, then cd to Desktop and type dir again. 

  6. Compile and run using the full path to javac/java.

  7. Set the PATH, modify the program, recompile with javac.

  8. Run the new program with java 

Here's how we did this in class: 

C:\Users\dgerman\Desktop>"C:\Program Files\Java\jdk1.6.0_33\bin\javac.exe" Progr
am.java

C:\Users\dgerman\Desktop>"C:\Program Files\Java\jdk1.6.0_33\bin\java.exe" Progra
m
1
8
0
true

Here I set the PATH: 

C:\Users\dgerman\Desktop>PATH=%PATH%;"C:\Program Files\Java\jdk1.6.0_33\bin"

Now I can use javac/java without the long sequence of folders: 

C:\Users\dgerman\Desktop>javac Program.java

C:\Users\dgerman\Desktop>java Program
1
8
0
true
 There's a tomato in every automaton.

At this stage the modified program is: 

class Program { 

  public static void main(String[] args) {

    System.out.println( 1 );

    System.out.println( 3 + 5 );

    System.out.println( 4 / 5 );

    System.out.println( 4 < 5 );

    System.out.println( " There's a tomato in every automaton. " );

  //SB221.lindsay.says( " 4 / 5 " ); 
    
  }
}

C:\Users\dgerman\Desktop>
 

  See you in lab!

--

  Shortly after lab Artur and I worked out this example: 


class LabOne {
  public static void main(String[] ags) {
    System.out.println("ksad gcsgf"); 

//              ,,,,,
//             _|||||_
//            {~*~*~*~}
//          __{*~*~*~*}__
//         `-------------`

  } 


This is how we worked it out: 

C:\Users\dgerman\Desktop>dir LabOne.java
 Volume in drive C has no label.
 Volume Serial Number is 42B8-DA49

 Directory of C:\Users\dgerman\Desktop

06/23/2014  01:10 PM               238 LabOne.java
               1 File(s)            238 bytes
               0 Dir(s)  64,716,460,032 bytes free

C:\Users\dgerman\Desktop>javac LabOne.java

C:\Users\dgerman\Desktop>dir LabOne*
 Volume in drive C has no label.
 Volume Serial Number is 42B8-DA49

 Directory of C:\Users\dgerman\Desktop

06/23/2014  01:11 PM               416 LabOne.class
06/23/2014  01:10 PM               238 LabOne.java
               2 File(s)            654 bytes
               0 Dir(s)  64,716,460,032 bytes free

C:\Users\dgerman\Desktop>type LabOne.java
class LabOne {
  public static void main(String[] ags) {
    System.out.println("ksad gcsgf");

//              ,,,,,
//             _|||||_
//            {~*~*~*~}
//          __{*~*~*~*}__
//         `-------------`

  }
}
C:\Users\dgerman\Desktop>java LabOne
ksad gcsgf

C:\Users\dgerman\Desktop>

So we realized that we can start converting this program: 

C:\Users\dgerman\Desktop>type LabOne.java
class LabOne {
  public static void main(String[] ags) {
    System.out.println("              ,,,,,");
    System.out.println("             _|||||_");

//
//
//            {~*~*~*~}
//          __{*~*~*~*}__
//         `-------------`

  }
}
C:\Users\dgerman\Desktop>javac LabOne.java

C:\Users\dgerman\Desktop>java LabOne
              ,,,,,
             _|||||_

C:\Users\dgerman\Desktop>

This gives us some of the cake, can we get it all? 

C:\Users\dgerman\Desktop>type LabOne.java
class LabOne {
  public static void main(String[] ags) {
    System.out.println("              ,,,,,");
    System.out.println("             _|||||_");
    System.out.println("            {~*~*~*~}");
    System.out.println("          __{*~*~*~*}__");
    System.out.println("         `-------------`");

//
//
//
//
//

  }
}
C:\Users\dgerman\Desktop>javac LabOne.java

C:\Users\dgerman\Desktop>java LabOne
              ,,,,,
             _|||||_
            {~*~*~*~}
          __{*~*~*~*}__
         `-------------`

C:\Users\dgerman\Desktop>

Now just get started with your lab. 

Your program needs to produce all the pictures!

--