CS241: Spring 2017 -- Expression evaluation - postfix to infix; and making a queue of 2 stacks

  1. Quiz feedback. For Thurs quiz: pseudo-code for converting infix to postfix.
  2. List vocabulary
    1. head - first thing in the list (or, the front of the list)
    2. tail - last thing in the list (or the end of the list)
  3. A few words about the basics of classes and superclasses
    1. All classes in Java extend Object!! So... when the compiler sees
      class Foo {...
      it changes it to
      class Foo extends Object {...
      for your convenience (just as it adds .toString() when you sout an instance of some class... convenience, it's done for your convenience)
    2. You can assign instances of subclasses to variables of their superclass(es)
    3. So... this is legal: Object something = new Foo();
    4. I.e. you can store *any* object in a variable of type Object; but! Having done so, you can only send that something messages that Object defines.
  4. Groups: implementing a queue with 2 stacks
  5. postfix to infix
  6. Finishing GreatBigInt, and then using it to compute Fibonacci(100). The process of building software.
    1. Representation -- ArrayList<Integer>, with one digit in each, least significant first
    2. Initialization -- addDigit(int)
    3. Display
    4. GreatBigInt add(GreatBigInt that) -- returns the sum of this and that
      1. this and that have the same number of digits
      2. this has more digits than that
      3. that has more digits than this
      4. carry
      5. designing your code to handle all the special cases... but what are they??