Grading:

20% Lab Assignments
20% Homework Assignments
20% Attendance
20% Midterm Exam
20% Final Exam

Next week: 

http://www.cs.kent.ac.uk/events/iticse2013/

Exam will have two parts: 

(a) write program from scratch

http://www.cs.indiana.edu/classes/a290-java/fall2012/templates/eight.htm

(b) answer questions

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

Here's another set of questions of this kind: 

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

int i; 

i = 3;

int b = i + 1; // expression on the right gets evaluated ... 

i = i + 1; // i becomes 4 

i++; // indeed i goes up by 1 here 

++i; // same here but how exactly does this work? 

i += 1; // i = i + 1; 

i = i++ + 1; // is this correct?     i increases by 2? 
             
i = i++; // is this correct?         i increases by 1? 

i = ++i; // is this correct?         i increases by 1? 

We put this program together then: 

class Trevan {
  public static void main(String[] args) {
    int i = 3; 
    i++;
    System.out.println( i );     // 4            : 4
    ++i;
    System.out.println( i );     // 5            : 5 
    i = i++ + 1; // I look at i++ and 1
                 // i++ means get the value of i: 5
                 // you will use it to add it to 1 
                 // next increment i by 1: i becomes 6 
                 // 5 will be added to 1 which gives us another 6
                 // that 6 needs to be placed into i
                 // so i becomes 6
    System.out.println( i );     // 7 ? 6        : 6
    i = i++;
    System.out.println( i );     // 8            : 6 
    i = ++i; 
    System.out.println( i );     // 9      ??    : 7
  
    int j = 6; 
    int b = j++ + j++; // b becomes 6 + 7 and j in the process becomes 8
    System.out.println( j + " " + b);  // 8 13

    b = ++j + ++j; 
    System.out.println( j + " " + b);  // 10 19 
    
    b = ++j + j++; // j is 10 becomes 11 (add it to 11) then make j 12 
    System.out.println( j + " " + b);  // 12 22
    
    for (int k = 0; k < 10; k++) ; { // k = k++ would be bad!
      System.out.println( "Howdy" );  
    }
    
  }
}

Next we discussed the problem for Monday

R1.12, R1.13

http://silo.cs.indiana.edu:8346/cgi-bin/c212/sum2013/readings?action=next&pic=intro/image014.jpg

The template is here: 

http://www.cs.indiana.edu/classes/a290-java/fall2012/templates/eight.htm

I will provide a second template by lab time and post it here: 

http://www.cs.indiana.edu/classes/c212/sum2013/07012013.html

You will also see two different links for two different templates in Class Notes. 

--