Difference between revisions of "IB Computer Science 2"

From WLCS
 
Line 1: Line 1:
== Wednesday (11/9/11) ==
+
== [[IBCS2 - Archives]] ==
'''Agenda:'''
 
* [http://contest.idtus.com/ IDT Programming Contest] will begin on 11/11/11
 
** Individuals and teams should meet after school on Monday (11/14/11)
 
*
 
 
 
== Wednesday - Friday (11/2/11 - 11/4/11) ==
 
'''Agenda:'''
 
* IDT Programming Contest
 
** Begins November 11, 2011
 
** Solutions submitted by December 27, 2011
 
** 1st place - $1,500
 
** 2nd place - $750
 
** 3rd place - $500
 
* [http://www.teamcarney.com/jamtech/ Carney JAMTech] - December 3rd
 
* Demo your completed [[Media:LinkedList.java]]
 
* Test your LinkedList using [[Media:LinkedListTestMain.java]]
 
* Flow Charts
 
* Prototype Solution due Wednesday (11/9/11)
 
** Be sure to create a complete "Initial Design" flow chart of program screens
 
** Each box should have a corresponding prototype window
 
** [[Media:CriterionA3_prototypeSolution.doc]]
 
* AddressBookLL Assignment
 
*# Create a new Java Project and name it AddressBookLLProject
 
*# Copy over your Contact, AddressBook, and AddressBookMain classes to this new project
 
*# Create a new class named ContactNode
 
*#* ContactNode should be just like Node, but instead of having an '''int num''', you should have a '''Contact contact''' as the internal attribute
 
*#* Also be sure to have the next reference, which should be of type: ContactNode
 
*#* Your ContactNode class should have two constructors: ContactNode() and ContactNode(Contact newContact)
 
*# Create a new class named ContactLinkedList
 
*#* Copy over your LinkedList code
 
*#* Convert the code so that it uses ContactNode and Contact instead of int
 
*#* Wherever you need to return an error Contact, return '''null''' or -1
 
*# Change AddressBook so that it uses the ContactLinkedList instead of the Contact[]
 
*#* Be sure to create a '''new''' instance of ContactLinkedList in the AddressBook() constructor
 
*#* Most of AddressBook will look MUCH simpler b/c all you need to do is use the ContactLinkedList
 
*#* Comment out your sort() method
 
*# Test out everything using AddressBookMain, which should not require any changes except for commenting out the sort option
 
 
 
'''Homework:'''
 
* [[Media:CriterionA3_prototypeSolution.doc]] due Wednesday (11/9/11)
 
* AddressBookLL Assignment due on Monday (11/14/11)
 
* You MUST work on the above at home.  There will not be much lab time to work on these assignments.
 
 
 
== Thursday - Monday (10/27/11 - 10/31/11) ==
 
'''Agenda:'''
 
* Download and complete [[Media:LinkedList.java]]
 
* Create your own main that tests out each of the Linked Lists's methods
 
* Test your LinkedList using [[Media:LinkedListTestMain.java]]
 
 
 
== Tuesday (10/25/11) ==
 
'''Agenda:'''
 
* [http://www.teamcarney.com/jamtech/ Carney, Inc. - JamTech - October, 29th]
 
* Turn in Criteria for Success!
 
** Peer Edits
 
* Missing Demos
 
* Introduction to Linked List
 
** [http://download.oracle.com/javase/7/docs/api/java/util/LinkedList.html Linked List JavaDoc]
 
** Download and complete [[Media:LinkedList.java]]
 
** Attributes: first, last, size
 
** Constructors: default
 
** Methods: listed in the file above
 
 
 
== 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:'''
 
* Dropbox, Google Docs, etc.
 
* Demo missing assignments
 
* Demo [[Media:DynamicQueue.java]]
 
* Work on [[Media:CriterionA2_criteriaforSuccess.doc]]
 
 
 
'''Homework:'''
 
* [[Media:CriterionA2_criteriaforSuccess.doc]] due Tuesday (10/25/11)
 
 
 
== Wednesday (10/19/11) ==
 
'''Warmup:'''
 
* What does FIFO stand for?
 
* What type of scenarios would we want to use a queue?  Give examples.
 
 
 
'''Agenda:'''
 
* Node References Quiz Review
 
* Complete and demo [[Media:DynamicQueue.java]]
 
* Problem Analysis peer edits
 
* Criteria for Success
 
** [[Media:CriterionA2_criteriaforSuccess.doc]] due Tuesday (10/25/11)
 
 
 
== 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
 
*** [[Media:DynamicStack.java]]
 
** 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:'''
 
# Obtain a whiteboard and marker
 
# Draw the memory diagram on the board
 
# Write the lines of code that would create the memory diagram
 
 
 
'''Agenda:'''
 
* Node Review
 
** [[Media:Node.java]]
 
** [[Media:NodeFunAgain.java]]
 
* Node references practice
 
*# Pair up with somebody near you
 
*# Each group will be given a memory diagram drawing from Mr. Bui
 
*# Individually write the lines of code to create the memory diagram
 
*# Compare your code with your partner's
 
*# 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
 
*** [[Media:DynamicStack.java]]
 
** 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:
 
*# Add "Andrew"
 
*# Add "Kyla"
 
*# Add "JJ"
 
*# Remove
 
*# Add "Biniam"
 
*# Remove
 
*# What is left in the queue?
 
 
 
'''Agenda:'''
 
* Demo your completed [[Media:Queue.java]] using [[Media:QueueMain.java]]
 
* Object and References Review
 
** [[Media:Point.java]]
 
** [[Media:ReferencesReview.java]]
 
* Node class
 
** [[Media:Node.java]]
 
** [[Media:NodeFun.java]]
 
** [[Media:NodeFunAgain.java]]
 
* Node references practice
 
*# Pair up
 
*# Each person should type up an example main that uses Nodes
 
*# Each person should then draw the memory diagram of the other person's code
 
*# Repeat!
 
* Everybody must be an expert using Nodes and references
 
 
 
== Tuesday (10/4/11) ==
 
'''Agenda:'''
 
* Turn in Dossier: Analysis of the Problem
 
* Stacks Quiz
 
* Queueueueueues (Queues)
 
** [[Media:Queues.ppt]]
 
** [[Media:Queue.java]]
 
** [[Media:QueueMain.java]]
 
* Fix [[Media:Queue.java]] so that it works. You must fill in all the method bodies
 
 
 
'''Homework:'''
 
* Fix [[Media:Queue.java]] so that it works. You must fill in all the method bodies
 
 
 
== Friday (9/30/11) ==
 
'''Agenda:'''
 
* Sorting Quiz
 
* Introduction to Abstract Data Type (ADT)
 
* Introduction to Data Structures
 
* Stacks
 
** [[Media:Stacks.ppt]]
 
** [[Media:Stack.java]]
 
** [[Media:StackMain.java]]
 
** [http://www.csanimated.com/animation.php?t=Stack Stack Animation]
 
* Stack Practice
 
*# After studying the stack code, you will attempt to re-create the Stack.java code
 
*# Create a new Java project called StackPractice
 
*# Download [[Media:EmptyStack.java]]
 
*# Rename EmptyStack.java to Stack.java AND add it to your StackPractice project
 
*# Download [[Media:StackMain.java]] and add it to your StackPractice project
 
*# Fill in the code for all the empty stack methods
 
*# Test your own stack code with StackMain.java
 
 
 
'''Homework:'''
 
* Analyzing the Problem due Tuesday (10/4/11)
 
* Quick Stack Quiz on Tuesday (10/4/11)
 
 
 
== Wednesday (9/28/11) ==
 
'''Warmup:'''
 
# Repeatedly comparing adjacent elements and swapping them so that they are in the correct order.  Which sort am I?
 
# Repeatedly look for the smallest thing currently in the collection and putting it aside.  Which sort am I?
 
 
 
'''Agenda:'''
 
* If you have no missing assignments, complete the optional survey.
 
* Insertion Sort
 
** From the very beginning...insert the value into the correct spot (there may need to be some shifting around)
 
* Quick Sort
 
*# Start with a partition (will be the entire list in the beginning)
 
*# Pick an element at random.  It will be the pivot value.
 
*# Go through the list and values less than the pivot are put before it and values greater than the pivot will come after.
 
*# The pivot also partitions the list into two sublists.  Repeat steps 1-4 for each of the sub-lists.
 
* [http://www.sorting-algorithms.com/ Sorting Animations]
 
* [http://en.wikipedia.org/wiki/Quicksort Quicksort]
 
* Sorting Quiz this Friday (9/30/11)
 
** Be able to explain each of the sorts
 
* Work on your Analysis of the Problem
 
* Demo missing assignments
 
 
 
'''Homework:'''
 
* Sorting Quiz this Friday (9/30/11)
 
* Analyzing the Problem due Tuesday (10/4/11)
 
 
 
== Back to School Night (9/26/11) ==
 
* [[Media:B2snIBCS2.ppt]]
 
 
 
== Monday (9/26/11) ==
 
'''Agenda:'''
 
* SelectionSort Review
 
* Demo SelectionSort.java
 
* Demo the sort option added to your AddressBook
 
* Introduction to Bubble Sort
 
# Initialize the front to be the top or beginning of the array
 
# Now go to the bottom/end of the array
 
# Compare the two adjacent elements to see if they are in proper sequential order
 
## Swap the elements if they are out of order (bigger number to the left of smaller number)
 
# Move to the next pair of adjacent elements/numbers
 
# Repeat steps 3 and 4 until the smallest number has "floated" to the top/front
 
# After you traverse the entire array
 
## Move the front so that the sorted numbers are ignored
 
## Go back to the end of the array
 
## Repeat steps 2 through 6 for the unsorted part of the array
 
<!--* [http://web.engr.oregonstate.edu/~minoura/cs162/javaProgs/sort/BubbleSort.html Bubble Sort Animation]-->
 
* [http://math.hws.edu/TMCM/java/xSortLab/ Sorting Animations]
 
* [http://www.cs.pitt.edu/~kirk/cs1501/animations/Sort2.html More Sorting Animations]
 
* Download [[Media:BubbleSort.java]]
 
** Fill in the commented parts of the BubbleSort.java file. Where there is a comment, you need to write code.
 
** Demo to Mr. Bui at the end of class
 
* Introduction to the Program Dossier
 
** [[Media:CriterionA1_problemAnalysis.doc]]
 
** Analyzing the Problem due Tuesday (10/4/11)
 
** Work on your Analyzing the Problem section
 
 
 
'''Homework:'''
 
* Any leftover AddressBook demonstrations (including a sort option)
 
* SelectionSort and BubbleSort
 
* Analyzing the Problem due Tuesday (10/4/11)
 
 
 
== Thursday (9/22/11) ==
 
'''Warmup:'''
 
# Form a group of 3 people
 
# Receive several playing cards from Mr. Bui
 
# Shuffle the cards
 
# Sort them in numerical order by repeatedly finding the smallest card and separating it
 
 
 
'''Agenda:'''
 
* Introduction to Selection Sort
 
# Find the smallest element
 
# Move to the front of the array (swap with front)
 
# Repeat Steps 1&2, but ignoring the sorted front
 
* [http://www.cs.oswego.edu/~mohammad/classes/csc241/samples/sort/Sort2-E.html Selection Sort Animation]
 
* [http://www.cs.ust.hk/faculty/tcpong/cs102/summer96/aids/select.html Another Selection Sort Animation]
 
* [http://math.hws.edu/TMCM/java/xSortLab/ Sorting Animations]
 
* Download [[Media:SelectionSort.java]]
 
** Fill in the commented parts of the SelectionSort.java file. Where there is a comment, you need to write code.
 
* Demo SelectionSort
 
* Add a (s)ort option to your AddressBook
 
** In order to compare Strings:
 
<source lang="Java">
 
if (str1.compareTo(str2) < 0)
 
{
 
  System.out.println(str1 + " goes before " + str2);
 
}
 
</source>
 
* So inside your AddressBook, you'd have something like this:
 
<source lang="Java">
 
if (myContacts[i].getLastName().compareTo(myContacts[j].getLastName()) < 0)
 
</source>
 
 
 
== Friday - Tuesday (9/16/11 - 9/20/11) ==
 
'''Warmup:'''
 
* Download [[Media:ConsoleInput.java]]
 
* Download [[Media:ConsoleInputExample.java]]
 
* Create a new Java project to test out ConsoleInput
 
 
 
'''Agenda:'''
 
* Return Software Development Quizzes
 
** Corrections for 1/2 partial credit (Turn in corrections by the end of the week)
 
* Complete [[AddressBook class lab assignment]] by the end of class
 
 
 
== Wednesday (9/14/11) ==
 
'''Warmup:'''
 
* [https://docs.google.com/spreadsheet/viewform?formkey=dGtvblF4ZDBvTWpTY2hyWFpYeVZGWFE6MQ Java Home Survey]
 
 
 
'''Agenda:'''
 
* Java Review?
 
** How does it all work?
 
*# Create Java Classes (object blueprints)
 
*# Create a separate main class with a main method.  The main method can use other objects defined in classes.
 
** [[Person class lab assignment]] - Complete in 5-10 minutes
 
** [[Car class lab assignment]] - Complete in 5-10 minutes
 
** [http://codingbat.com/java CodingBat - Java] - Practice!
 
* Review Arrays
 
** [[Media:IntroArrays.ppt]]
 
* Array practice activities
 
*# Create a new Java class named ArrayPractice1.  Create an array of 10 Strings (Use names of students in the room).  Using a for loop, print out all the Strings in the array.
 
*# Create a new Java class named ArrayPractice2.  Create an array of 10 integers (make a bunch of numbers up).  Using a for loop and an if statement, print print out only numbers greater than 10.
 
*# Create a new Java class named ArrayPractice3.  Create an array of 10 integers.  Using a for loop, calculate the sum and average.
 
* AddressBook beginning walk-through
 
* [[AddressBook class lab assignment]]
 
 
 
'''Homework:'''
 
* Install the [http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html Java JDK] on your computer (be sure to choose your corresponding operator system)
 
* Install [http://www.eclipse.org/downloads/packages/eclipse-classic-37/indigor Eclipse Classic] on your computer (be sure to choose your corresponding operator system on the right)
 
* Test it out, and let Mr. Bui know if you run into problems
 
 
 
== Monday - Wednesday (9/12/11 - 9/14/11) ==
 
'''Warmup:'''
 
* Redo the [https://docs.google.com/spreadsheet/viewform?formkey=dGg5OERiaDRZYmtBLUNaQ1pDTjVMR3c6MQ Comfort Zone Survey]
 
* Be prepared to demo Contact
 
* Cram for quiz (Hint: There is a question on almost every slide...lol!)
 
 
 
'''Agenda:'''
 
* Software Development Quiz
 
* Demo [[Contact class lab assignment]].  It must be completed in order to do the [[AddressBook class lab assignment]]
 
 
 
'''Homework:'''
 
* Install the [http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html Java JDK] on your computer (be sure to choose your corresponding operator system)
 
* Install [http://www.eclipse.org/downloads/packages/eclipse-classic-37/indigor Eclipse Classic] on your computer (be sure to choose your corresponding operator system on the right)
 
* Test it out, and let Mr. Bui know if you run into problems
 
 
 
 
 
== Tuesday - Thursday (9/6/11 - 9/8/11) ==
 
'''Warmup:'''
 
* Complete the [https://docs.google.com/spreadsheet/viewform?formkey=dGg5OERiaDRZYmtBLUNaQ1pDTjVMR3c6MQ Comfort Zone Survey]
 
 
 
'''Agenda:'''
 
* Introductions
 
* Name cards
 
* Lab setup/config
 
** Login username is your first initial and lastname (e.g. pbui)
 
** Your password is your student ID number
 
** Go to Apple (upper left) -> System Preferences -> Accounts -> Change Password
 
* [http://spreadsheets.google.com/viewform?key=p6_k1SMbS2zvMHJNJBBkFPA Student Surveys]
 
* Turn in [[IBCS2 Summer Assignment]]
 
* [[IB Computer Science II Syllabus]]
 
* Introduction to Software Development
 
** [[Media:SoftwareDevelopment.ppt]]
 
* Software Development Quiz on Monday (9/12/11)
 
* [[Contact class lab assignment]]
 
** Demo at the beginning of next class.
 
 
 
'''Homework:'''
 
* Software Development Quiz on Monday (9/12/11)
 
* [[Contact class lab assignment]]
 
 
 
== Summer ==
 
* [[IBCS2 Summer Assignment]]
 

Latest revision as of 08:28, 13 September 2023