There's an exam on Wed, continuing in lab on Fri.

There will be assigned seating.

https://cs.indiana.edu/classes/c212/fall2019/midterm.html

Please check that you appear once and only once. I will e-mail as well.

(a) What is the difference between studying and learning?

(b) Would you study harder to ace a test or teach a review session? 

Books are cold friends but they are good friends. 

My promise to you is that I will try to make your exam entirely of self-check 
questions exactly as they appear in the book. If I can’t exactly I promise it 
will definitely come pretty close. 

page 271-272:

public class Ata {
  public static void main(String[] args) {
    boolean found = false;
    String str = "Whatever I said before?"; // 8 
              // "How are you today?" // 3
    for (int position = 0;
         !found && position < str.length();
         position++){
           char c = str.charAt(position);
           if (c == ' ') {
             System.out.println( position ); 
             found = true;
           }
         } 
     // System.out.println(position); // out of scope
  }
}

The answer for this question is: 

on page 306 same as Ata's. 


import java.util.*;

public class Haocheng {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in); 
    double sum = 0;
    int count = 0; 
    System.out.println("Enter values, Q to quit: ");
    do {
      double value = in.nextDouble(); // in is a java.util.Scanner
      sum = sum + value; // sum, count defined earlier as doubles
      count++; // both properly initialized upon creation
    } while (in.hasNextDouble());
    
  }
}