Daniel 
+---------------------+----------------------+
| Justin    Staci     |  JSON      Dylan K   |
| Kyle N    Justin    |  George W  Austin S  |
+---------------------+----------------------+
| Neelan    Erik      |  Adam K    Kyle C    |
| Max       Artur     |  Adam J    Alex S    |
+---------------------+----------------------+
| Mary-Anne   Yinan   |  Ruifeng   Hang Z    |
| Kexin     Zhichao   |  Yi        Yunsheng  |
+---------------------+----------------------+
                         Adrian 

Midterm exam is on Thu. 

It will have two parts:

  (a) the first part is 60 minutes 

  (b) the second part is 15 + 60 minutes with a 105 minutes break. 

The first part is a warmup. 

It's on paper. 

You answer questions such as 24-31 in 

http://www.cs.indiana.edu/classes/c212-dgerman/spr2013/eeexam.pdf

Suppose the value of b is false and the value of x is 0. 

What is the value of each of the following expressions?

  24. b && (x == 0) is false && 0 == 0 which is false && true == false 

  25. b || (x != 0) false because it is false || 0 != 0 which is
                                        false || false which is false 

  26. !b && (x == 0) (! false) && true == true && true == true

  27. !b || (x != 0)
     true || false 
        true 

Simplify the following expressions. Here, b is a variable of type boolean.

  28. b == true       b     b == true   so the simplification is: b 
                     false   false 
                     true    true 

  29. b == false      b      b == false   ! b is the simplification 
                     false    true       
                     true     false 

  30. b != true      ! b 

  31. b != false     b 

Other possible exercises for this part: 32-35 in the same document. 

Simplify the following statements. 

Here b is a variable of type boolean and n is a variable of type int.

32. if (n == 0) { 
      b = true; 
    } else { 
      b = false; 
    }

    b = (n == 0); 

33. if (n == 0) { 
      b = false; 
    } else { 
      b = true; 
    }

    b = ! (n == 0);

    b =   (n != 0); 

34. b = false; 
    if (n > 1) { 
      if (n < 2) { 
        b = true; 
      } 
    }

    ! b because n being an integer 

    b = (1 < n && n < 2);     

35. if (n < 1) {       if (n < 1) {            b = (n < 1 || n > 2)
      b = true;          b = true; 
    } else {           } else { 
      b = n > 2;         if ( n > 2) { 
    }                      b = true; 
                         } else {
                           b = false; 
                         }
                       }  

    n             b = n != 1 && n != 2

                  b = !((n == 1) || (n == 2)) 
                      ! (n == 1) && !(n == 2)
                      n != 1 && n != 2

    < 1           b = true 
    1             b = false  
    2             b = false   
    > 2           b = true 
    
   n 
   ---------------  1 --------- 2 -----------------
   b    true       false      false    true 


Later on from: 

  https://www.cs.indiana.edu/classes/c212/sum2014/abcdef.pdf

We have, as an example: 

  s = s0 + v0 * t + g * Math.pow(t, 2) / 2


Here's how the four exams will look:

  (a) part one of the midterm: on paper, closed book

      questions like the ones discussed today

      you will also be given the two problems in part two 

      you will have to commit to an approach for those problems

      the approach described must be reasonably clear (almost correct Java code)

  (b) part two of the midterm: starts when the written part ends

      you can use anyone and anything online to solve the two problems

      but you have to do it as indicated in the written part 

      you may deviate a little if you need to fix some error (and explain it)

More questions about characters: 

  '5' - '3' == 2

  '2' + 0 

  2 + 0

  2 + '0' 

In lab today you will solve problems from: 

       http://www.cs.indiana.edu/classes/c212-dgerman/fall2012/review.html

Final also has two parts:

   (a) part one is modeling (includes abstract classes, interfaces, polymorphism etc.)

   (b) part two is an extension of the project 

We will start the project next week.

See you in lab. 

--