IBCS2 - 1516 - November

From WLCS

Friday - Tuesday (11/20/15 - 11/24/15)

  • Demo DynamicQueue
  • Introduction to Linked Lists (walk-through)
    • Data Structure Visualizations
    • What does a Linked List look like?
    • Linked List attributes
      • first
      • last
      • size
    • Linked List methods
      • adding data (beginning, middle, end)
      • deleting data (beginning, middle, end)
      • getting data
      • modifying data
      • searching for data
      • clearing all data
    • Complete LinkedList assignment posted on Google Classroom

Wednesday (11/18/15)

Agenda:

  • Finish DynamicStack walk-through
  • Testing DynamicStack
  • Dynamically-sized Queues - complete by the end of today
    1. On paper, draw the before-and-after pictures for enqueue()'s 2 scenarios:
      1. enqueueing to an empty queue
      2. enqueueing to a non-empty queue
    2. Draw the before-and-after pictures for dequeue()'s 3 scenarios:
      1. dequeueing an empty queue
      2. dequeueing the very last node
      3. dequeueing normally when the queue has more than one node
    3. Write the dynamically-sized queue code
      1. Use a combination of the StaticQueue and DynamicStack as templates
        • i.e. implement all the methods from StaticQueue (except for isFull())
      2. Be sure to test your DynamicQueue like the DynamicStack

Monday (11/16/15)

Agenda:

  • Node Quiz!
  • Dynamically-sized Stacks
    • Data Structure Visualizations
    • Stack scenarios and Before-&-After pictures
      1. What are the possible behaviors of a stack?
      2. What does the picture look like Before?
      3. What does the picture look like After?
    • 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 void push(data) using Nodes.
      • push() should not return anything
      • push() creates a new Node with the data, and set the new Node's next reference to the top
      • Don't forget to update the top to be the new node!
    • Implement int pop() using Nodes
      • pop() removes the value on top of the stack, return it
      • pop() should also update the top
      • pop() returns null if the stack is empty
    • Implement isEmpty() which returns true if the stack is empty, and false otherwise
    • Implement print() which should print your entire stack from top down (to null)
    • TEST YOUR STACK
      • Be sure to push A LOT of data to test the dynamic size
      • Also test popping A LOT of data to make sure it works too

Thursday (11/12/15)

Agenda:

  • Stacks and Queues Quiz
  • IDT Programming Contest meeting today for team registrations
  • Dual Enrollment for NVCC CSC201
  • Node review
  • Node Quiz on Monday (11/16/15)
    • Be able to trace code and draw memory diagram
    • Be able to write code that creates a given memory diagram
  • Dynamically-sized Stacks
    • Data Structure Visualizations
    • Stack scenarios and Before-&-After pictures
      1. What are the possible behaviors of a stack?
      2. What does the picture look like Before?
      3. What does the picture look like After?
    • 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 void push(data) using Nodes.
      • push() should not return anything
      • push() creates a new Node with the data, and set the new Node's next reference to the top
      • Don't forget to update the top to be the new node!
    • Implement int pop() using Nodes
      • pop() removes the value on top of the stack, return it
      • pop() should also update the top
      • pop() returns null if the stack is empty
    • Implement isEmpty() which returns true if the stack is empty, and false otherwise
    • Implement print() which should print your entire stack from top down (to null)
    • TEST YOUR STACK
      • Be sure to push A LOT of data to test the dynamic size
      • Also test popping A LOT of data to make sure it works too

Monday (11/9/15)

Agenda:

Monday - Thursday (11/2/15 - 11/5/15)

Warmup:

  1. List and describe the stack operations (names of methods and what they do)
  2. List and describe the queue operations (names of methods and what they do)

Agenda: