IBCS2 - 1112 - October

From WLCS

Thursday - Monday (10/27/11 - 10/31/11)

Agenda:

Tuesday (10/25/11)

Agenda:

Friday (10/21/11)

Warmup:

  • List several methods of data collection (during the analysis stage of the software development cycle)
    • Discuss the advantages and disadvantages of each.

Agenda:

Homework:

Wednesday (10/19/11)

Warmup:

  • What does FIFO stand for?
  • What type of scenarios would we want to use a queue? Give examples.

Agenda:

Monday (10/17/11)

Warmup:

  • Draw what you think a Queue with numbers 8, 6, 7, 5 would look like using Nodes. Remember head and tail!
  • Draw what you think an empty Queue would look like. Remember head and tail!

Agenda:

  • Demo DynamicStack
  • Review Dynamic Queue
    • Memory diagrams for each method
    • Begin/Starting scenarios for each method
    • Draw the before-and-after pictures for adding a Node to an empty Queue (be sure to use head and tail!)
    • Draw the before and after pictures for adding a Node to a non-empty Queue
    • Draw the before-and-after pictures for removing a Node from an empty Queue
    • Draw the before and after pictures for removing a Node from a non-empty Queue
  • Complete and demo Media:DynamicQueue.java

Thursday (10/13/11)

Agenda:

  • Node References Quiz
  • Stack memory diagrams
  • Dynamically-sized Stacks
    • Create a new class called DynamicStack
    • What attribute must we keep track of when we talk about stacks?
    • Create a Node reference for the most important stack attribute
    • Implement push(int num) using Nodes.
      • push() should not return anything
      • push() creates a new Node with the num, and set the new Node's next reference to the top
      • Don't forget to update the top to be the new node!
    • Implement pop(), which should POP and return the value on top of the stack and update the top
    • Implement top(), which should just return the value on top of the stack
    • Implement isEmpty() which returns true if the stack is empty
    • Implement print() which should print your entire stack
    • TEST YOUR STACK USING MR. BUI'S STACK MAIN OR YOUR OWN MAIN METHOD
  • Review Dynamic Queue
    • Memory diagrams for each method
    • Begin/Starting scenarios for each method
    • Draw the before-and-after pictures for adding a Node to an empty Queue (be sure to use head and tail!)
    • Draw the before and after pictures for adding a Node to a non-empty Queue
    • Draw the before-and-after pictures for removing a Node from an empty Queue
    • Draw the before and after pictures for removing a Node from a non-empty Queue
  • Complete and demo Media:DynamicQueue.java

Tuesday (10/11/11)

Warmup:

  1. Obtain a whiteboard and marker
  2. Draw the memory diagram on the board
  3. Write the lines of code that would create the memory diagram

Agenda:

  • Node Review
  • Node references practice
    1. Pair up with somebody near you
    2. Each group will be given a memory diagram drawing from Mr. Bui
    3. Individually write the lines of code to create the memory diagram
    4. Compare your code with your partner's
    5. Go up to the board and present
  • Nodes Quiz on Thursday (10/13/11)
    • Be able to trace code and draw memory diagram
    • Be able to write code that creates a given memory diagram
  • Static vs. Dynamic
  • Dynamically-sized Stacks
    • Create a new class called DynamicStack
    • What attribute must we keep track of when we talk about stacks?
    • Create a Node reference for the most important stack attribute
    • Implement push(int num) using Nodes.
      • push() should not return anything
      • push() creates a new Node with the num, and set the new Node's next reference to the top
      • Don't forget to update the top to be the new node!
    • Implement pop(), which should POP and return the value on top of the stack and update the top
    • Implement top(), which should just return the value on top of the stack
    • Implement isEmpty() which returns true if the stack is empty
    • Implement print() which should print your entire stack
    • TEST YOUR STACK USING MR. BUI'S STACK MAIN OR YOUR OWN MAIN METHOD

Homework:

  • Node Quiz on Thursday (10/13/11)
    • Be able to trace code and draw memory diagram
    • Be able to write code that creates a given memory diagram

Thursday (10/6/11)

Warmup:

  • What does FIFO stand for?
  • When would you want to use a queue? Give an example
  • Assume the following queue operations have occurred:
    1. Add "Andrew"
    2. Add "Kyla"
    3. Add "JJ"
    4. Remove
    5. Add "Biniam"
    6. Remove
    7. What is left in the queue?

Agenda:

Tuesday (10/4/11)

Agenda:

Homework: