teaching machines

CS 145 Lecture 20 – Midterm 2 Review

November 18, 2011 by . Filed under cs145, exams, fall 2011, lectures.

Things to know

Review questions

  1. Evaluate !(a && !b) for all possible values of booleans a and b.
  2. Write a method that moves the mouse in a square.
  3. Write a loop that moves the mouse in a square 10 times.
  4. Write a method prepend that takes a String array argument and a prefix String and prepends the prefix onto all elements in the array.
  5. Write a method called split that takes a String and a String delimiter and returns the tokens of the String delimited by the delimiter as an array.