Difference between revisions of "IB Computer Science 2"

From WLCS
 
Line 1: Line 1:
== Thursday (10/4/12) ==
+
== [[IBCS2 - Archives]] ==
'''Agenda:'''
 
* Turn in Criterion A: Analyzing the Problem
 
* Stack Review
 
* Introduction to Queues
 
 
 
== Friday - Tuesday (9/28/12 - 10/2/12) ==
 
'''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:'''
 
* 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 on Tuesday (10/2/12)
 
** Be able to explain the steps of each of the sorts
 
 
 
* 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:'''
 
* Sorting Quiz on Tuesday (10/2/12)
 
* Analyzing the Problem due Thursday (10/4/11)
 
 
 
== Wednesday (9/26/12) ==
 
'''Warmup:'''
 
* Assume you have the following code:
 
<source lang="Java">
 
a = 3
 
b = 5
 
 
 
System.out.println("a = " + a);
 
System.out.println("b = " + b);
 
 
 
//INSERT YOUR CODE HERE
 
//swap the values in the variables here
 
 
 
 
 
System.out.println("a = " + a);
 
System.out.println("b = " + b);
 
</source>
 
 
 
'''Agenda:'''
 
* Introduction to the Program Dossier
 
** [[Media:CriterionA1_problemAnalysis.doc]]
 
** Analyzing the Problem due Thursday (10/4/11)
 
** Work on your Analyzing the Problem section
 
* Demo SelectionSort.java
 
* 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://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
 
 
 
== Monday (9/24/12) ==
 
* 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://math.hws.edu/TMCM/java/xSortLab/ Sorting Animations]
 
* [http://www.cs.pitt.edu/~kirk/cs1501/animations/Sort2.html More Sorting Animations]
 
* [http://www.cs.oswego.edu/~mohammad/classes/csc241/samples/sort/Sort2-E.html Another Selection Sort Animation]
 
* [http://www.cs.ust.hk/faculty/tcpong/cs102/summer96/aids/select.html Another Selection Sort Animation]
 
* 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
 
 
 
== Thursday (9/20/12) ==
 
'''Agenda:'''
 
* [http://www.teamcarney.com/jamtech/ JAMtech]
 
* Missing demos
 
* Completed [[AddressBook class lab assignment]] by the end of class
 
 
 
== Friday - Tuesday (9/14/12 - 9/18/12) ==
 
'''Warmup:'''
 
* Download and run [[Media:KeyboardInputDemo.java]]
 
* Analyze how it works
 
 
 
'''Agenda:'''
 
* Demo [[Media:CombatSimulation.java]]
 
* Demo the Array Practice
 
* AddressBook beginning walk-through
 
* [[AddressBook class lab assignment]]
 
 
 
'''Homework:'''
 
* Completed [[AddressBook class lab assignment]] by the end of next class
 
 
 
== Wednesday (9/12/12) ==
 
'''Agenda:'''
 
* Demo [[Media:CombatSimulation.java]]
 
* Review Arrays
 
** [[Media:JavaArrays_Basic.ppt]]
 
** [[Media:IntroArrays.ppt]]
 
* Array practice activities.  Create a new Java class named ArrayPractice
 
*# 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 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 an array of 10 integers.  Using a for loop, calculate the sum and average.
 
*# Demo ArrayPractice
 
* AddressBook beginning walk-through
 
* [[AddressBook class lab assignment]]
 
 
 
== Monday (9/10/12) ==
 
'''Warmup:'''
 
# Bring up NetBeans
 
# Import your summer assignment
 
#* [[Weapon class assignment]]
 
#* [[Creature class assignment]]
 
# Demo using [[Media:CombatSimulation.java]]
 
 
 
'''Agenda:'''
 
* Software Development Quiz
 
* Java Review?
 
** [[Media:IntroClasses.ppt]]
 
** [[Media:JavaArrays_Basic.ppt]]
 
** [[Media:IntroArrays.ppt]]
 
* Complete [[Contact class lab assignment]]
 
* AddressBook beginning walk-through
 
* [[AddressBook class lab assignment]]
 
 
 
== Thursday (9/6/12) ==
 
* Re-introductions
 
* [[IB Computer Science II Syllabus]]
 
* Turn in [[IBCS2 Summer Assignment]] book work
 
* Introduction to Software Development
 
** [[Media:SoftwareDevelopment.ppt]]
 
* Software Development Quiz on Monday (9/10/12)
 
* Test [[IBCS2 Summer Assignment]] code on computer
 
 
 
== Tuesday (9/4/12) ==
 
* 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
 
** Acceptable-use policies apply in this lab!
 
* Complete the [http://spreadsheets.google.com/viewform?key=p6_k1SMbS2zvMHJNJBBkFPA Student Surveys]
 

Latest revision as of 08:28, 13 September 2023