CS130 - 3/14/2011

  1. news
  2. A simpler way to do the coin problem
  3. Java programming (at last!): towards writing your own editor. Reading from files.
    1. public static void main(String[] args)
    2. sout - System.out.println
    3. variables (all information is stored in variables): String, int
    4. the assignment statement ::= <variable> = <expression>
    5. The message statement -- object.message(parameters);
    6. TextArea - a familiar built-in Text Component
      1. setText("whatever")
      2. getText()
      3. append("whatever")
    7. MyReader - a convenience class for reading files
      1. MyReader mr = new MyReader()
      2. mr.hasMoreData()
      3. mr.giveMeTheNextLine()
      4. mr.close()
  4. Lab demos/help