This was the attendance at the help session today: 

                                                                           Luke (lgalle)
                       Dom (djgallo)

Dylan (dmdale)    Alexis (arichier)    Thomas (ttorbik)

Juan (jjdelval)    Jordan (jvgaeta)             Nick Leisure

Rowan (rtansey)   Jennifer(jnvasko)        Anthony (anthcham)      Ding (dingding)

Chelsie (ckasun)    Xijian Mo (ximo)     zhang343 (ZHANG, HANWEN)  Chris (chrigrif)  zhenwu (Wu, Zhenni)

Steve (ma36)        Jared (jamaherb)   jinsh (Jin, Shengnan)


We worked on the study guide I posted. 

Here's the discussion regarding the do-while to while transformation:

  int n = 1;
  double x = 0;
  double s;
  do {
+----------------------+
|   s = 1.0 / (n * n); |
|   x = x + s;         |
|   n++;               |
+----------------------+
  } while (s > 0.01);


  int n = 1;
  double x = 0;
  double s;
+----------------------+
|   s = 1.0 / (n * n); |
|   x = x + s;         |
|   n++;               |
+----------------------+
  while (s > 0.01) {
+----------------------+
|   s = 1.0 / (n * n); |
|   x = x + s;         |
|   n++;               |
+----------------------+
  }

Here's the program we wrote to clarify the answers: 

class One {
  public static void main(String[] args) {
    int a = 5 * (7 + 4 / 2);
    System.out.println( a );
    System.out.println( (5 * (7 + 4 / 2)) );
    System.out.println( (double) (5 * (7 + 4 / 2)) );
    System.out.println( 5 * 7 + 1 / 3 );
    System.out.println( '5' - '3' );
    System.out.println( '5' + 0 );
    System.out.println( 'C' - 'A' );
    // http://www.asciitable.com/
    // http://docs.oracle.com/javase/7/docs/api/java/lang/Math.html#sqrt%28double%29
    char m = (char) 123;
    System.out.println( m );
    // System.out.println( "cat" - "mouse" );
    System.out.println( (9 / 4) * 4 + 9 % 4 );
    boolean d = (9 / 4 == 7 / 2);
    System.out.println( d );
    System.out.println( 9 / 4 == 7 / 2 );
    System.out.print( "For Xijian: ");
    System.out.println( false || (true && ! true) );
    System.out.println( 1 + 2 + "3" + 4 + 5 );
    System.out.println( 1 + 2 + "3" + (4 + 5) );

    System.out.println( "automaton".charAt(5) + 0 );

    System.out.println( "automaton".substring(2, "automaton".length() - 1) );
    // http://www.cs.indiana.edu/classes/a201-dger/sum2001/lectures/five/img1.gif
    System.out.println( 2 * 3 / 2 * 3 );
    System.out.println(Math.sqrt(Math.pow(Math.sqrt(Math.pow(Math.sqrt(2),2)),2)));
    // s = s0 + v0 * t + 1 / 2.0 * g * t * t;
    // http://www.cs.indiana.edu/classes/a201-dger/sum2000/quizzes/img1.gif
    // http://en.wikipedia.org/wiki/Daniel_Gabriel_Fahrenheit
    // http://en.wikipedia.org/wiki/Anders_Celsius
    int f = 68;
    double c = 5 / 9 * (f - 32); // replace 9 with 9.0 for better results
    System.out.println( c );
    System.out.println("\\\"");
    System.out.println( "\\n\"\\b\\t" );
    {
      boolean x;
      if (true)
        System.out.print(0);
      else
        System.out.print(1);
      x = (1 < 2) && (4 < 3);
      if (x)
        System.out.print(2);
      else
        System.out.print(3);
    }
    System.out.println();
    {
      boolean x;
      if (true)
        System.out.print(3);
      else
        System.out.print(2);
      x = (1 < 2) || (4 < 3);
      if (x)
        System.out.print(1);
      else
        System.out.print(0);
    }
    System.out.println();
    {
      boolean x;
      if (true)
        System.out.print(3);
      else
        System.out.print(2);
      x = (1 < 2) || (4 < 3);
      if (x)
        System.out.print(1);
      /*else*/
        System.out.print(0);
    }
    System.out.println();
    {
      boolean x = false;
      if (true)
        System.out.print(0);
      else
        System.out.print(1);
      x = x || !x;
      if (x)
        System.out.print(2);
      else
        System.out.print(3);
    }
    System.out.println();
    // ( ... ) ? ... : ... the basic syntax of the ternary operator
    { int x = 6;
      int y = -1;
      if (x > 3) {
        if (x <= 5)
          y = 1;
        else if (x != 6)
          y = 2;
      } else
        y = 3;
      System.out.println( y );
    }

    {
      int j = 3;

      j = ++j + ++j;
         // 4 as j just became 4
               // 5 as j just became 5
         // 4 +   5 needs to be evaluated (to 9)
      // so j is set to 9
      System.out.println( j );
    }
    /* the following is an infinite loop since i never changes:
     *
    for (int i = 0; i < 10; i = i++) {
      System.out.println( i + ". Hi there." );
    }
     */
    int x = 10, y = 3;
    System.out.println( "x: " + x + " y: " + y );
    while (x > 0 && y > 0) {
      System.out.println( "  x becomes " + x + " - " + y + " that is: " + (x - y));
      x = x - y;
      y = y + 1;
      System.out.println( "  y becomes " + y );
      System.out.println( "-------------------");
    }
    System.out.print(x);
    System.out.println(" I stopped because x is " + x );
    // example of tracing

    System.out.println(nuf( // 1 - 4
                           fun( // 5 - 1
                               5,
                               nuf( // 2 - 1
                                   fun( // 4 - 3
                                       4,
                                       3),
                                   2)
                              ),
                           1
                          )
                      ); // so that's why this prints -3
    // (1 - (5 - (2 - (4 - 3))) is what really happens

    { int sum = 0;
      for (int i = 0; i <= 10; i++) {
        sum = sum + i;
      }
      System.out.println( sum );
    // }                 // I'd keep these
    // { int sum = 0;    // I'd keep these
      // sum = 0; // this could be a fix if I didn't want two blocks
      for (int i = 0; i <= 10; i++) {
        sum = sum + i * i;
      }
      System.out.println( sum );
    }

  }
  public static int fun(int a, int b) {
    return a - b;
  }
  public static int nuf(int b, int a) {
    return a - b;
  }
}

Here's what the program produces when run: 

Welcome to DrJava.  Working directory is C:\Users\dgerman
> run One
45
45
45.0
35
2
53
2
{
9
false
false
For Xijian: false
3345
339
97
tomato
9
1.4142135623730951
0.0
\"
\n"\b\t
03
31
310
02
-1
9
x: 10 y: 3
  x becomes 10 - 3 that is: 7
  y becomes 4
-------------------
  x becomes 7 - 4 that is: 3
  y becomes 5
-------------------
  x becomes 3 - 5 that is: -2
  y becomes 6
-------------------
-2 I stopped because x is -2
-3
55
440
>

Good luck tomorrow!