teaching machines

CS 145 Lecture 11 – Relational Operators

September 26, 2014 by . Filed under cs145, fall 2014, lectures.

Agenda

TODO

Code

Relational.java

package lecture0926;

public class Relational {
  public static void main(String[] args) {
    // int age = 120;
    // boolean isEligible = (age >= 62);
    // System.out.println(isEligible);
    
    // int nBalls = 5;
    // boolean isWalk = (nBalls == 4);
    // System.out.println(isWalk);
    
    // int nSpouses = -1;
    // boolean isPolygamous = nSpouses > 1;
    // System.out.println(isPolygamous);
    
    // int secret = 17;
    // int guess = 17;
    // boolean isWrong = guess != secret;
    // System.out.println(isWrong);
    
    // double bac = 0.0799999999;
    // boolean isLegal = bac < 0.08;
    // System.out.println(isLegal);
    
    String name = "Demosthenes";
    int nFingers = 11;
    boolean isTattoable = name.length() <= nFingers;
    System.out.println(isTattoable);
  }
}

Haiku

on mixed bags:
Big looked at Little:
You’re not 0; I’m not MAX
That makes us equals