|
|
(131 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
− | == Tuesday (10/13/09) ==
| + | #REDIRECT [[IB Computer Science 2]] |
− | '''Warmup:'''
| |
− | * What are the advantages and disadvantages of the binary search algorithm?
| |
− | | |
− | '''Agenda:'''
| |
− | * Dossier peer review - Analysis of the Problem
| |
− | * Demo any missing work
| |
− | * Sorting & Searching Review
| |
− | ** Selection Sort
| |
− | ** Bubble Sort
| |
− | ** Linear Search
| |
− | ** Binary Search
| |
− | * Examples of using the String.compareTo() method
| |
− | ** [[Media:CompareToDemo.java]]
| |
− | ** [[Media:CompareToDemo2.java]]
| |
− | * Fix [[Media:StringBinarySearch.java]] such that it uses binary search to find a String. Hint: You will be using the compareTo()
| |
− | * Demo StringBinarySearch to Mr. Bui by the end of today.
| |
− | | |
− | * You should then add selectionSort() to your AddressBook class. It sorts your AddressBook Contact array by last name using the selection sort algorithm. You may assume that everybody will have a different last name.
| |
− | * You should then add bubbleSort() to your AddressBook class. It sorts your AddressBook Contact array by last name using the bubble sort algorithm. You may assume that everybody will have a different last name.
| |
− | * Demo the two sorting methods to Mr. Bui before Thursday.
| |
− | * Read through [[Media:CriterionA2_criteriaforSuccess.doc]]
| |
− | * Begin working on your Criteria for Success. It will be due next Wednesday (10/21/09).
| |
− | | |
− | == Thursday (10/8/09) ==
| |
− | '''Warmup:'''
| |
− | * Given the array of integers: 3, 6, 2, 7, 9, 5, 2, 3
| |
− | * Illustrate the bubble sort algorithm to sort the numbers
| |
− | | |
− | '''Agenda:'''
| |
− | * Introduction to Linear Search
| |
− | * Download [[Media:LinearSearch.java]]
| |
− | * Fill in the commented parts of LinearSearch.java and demo a working linear search to Mr. Bui
| |
− | * Linear Search performance evaluation
| |
− | # What is the best case scenario? i.e. What is the minimum # of comparisons?
| |
− | # What is the worst case scenario? i.e. What is the maximum # of comparisons?
| |
− | # What is the average # of comparisons?
| |
− | # Can we do better than a linear search? | |
− | | |
− | * Introduction to Binary Search
| |
− | # Assume sorted list
| |
− | # Go to the middle point
| |
− | # If the middle element matches the key, then the search is over
| |
− | # If the key is less than middle element, go to the left (down), else go to the right (up)
| |
− | # Repeat steps 2-4 until the key is found or when the left and right bounds pass each other
| |
− | | |
− | * [http://euler.slu.edu/~goldwasser/demos/BinarySearch/ Binary Search Demo]
| |
− | * [http://www.cosc.canterbury.ac.nz/people/mukundan/dsal/BSearch.html Binary Search Demo2]
| |
− | * [[Media:BinarySearch.java]]
| |
− | * Binary Search performance evaluation
| |
− | # What is the best case scenario? i.e. What is the minimum # of comparisons?
| |
− | # What is the worst case scenario? i.e. What is the maximum # of comparisons?
| |
− | # What is the average # of comparisons?
| |
− | * Binary Search Advantages & Disadvantages
| |
− | | |
− | '''Homework:'''
| |
− | * 1st rough draft of Analysis of the Problem due Tuesday (10/13/08)
| |
− | * Any missing assignments (e.g. AddressBook, SelectionSort, BubbleSort)
| |
− | | |
− | == Tuesday (10/6/09) ==
| |
− | '''Warmup:'''
| |
− | * Upload AddressBook.java and AddressBookMain.java to SchoolWebLockers
| |
− | * Demo SelectionSort.java to Mr. Bui
| |
− | * Turn in your Dossier idea sentence
| |
− | | |
− | '''Agenda:'''
| |
− | * 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]
| |
− | * 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 or at the beginning of class tomorrow
| |
− | * Introduction to Program Dossier
| |
− | ** [[Media:CriterionA1_problemAnalysis.doc]]
| |
− | ** 1st rough draft of Analysis of the Problem due Tuesday (10/13/08)
| |
− | ** Work on your Analysis of the Problem section
| |
− | | |
− | == Friday (10/2/09) ==
| |
− | '''Warmup:'''
| |
− | * Swapping elements warmup
| |
− | | |
− | '''Agenda:'''
| |
− | * Demo [[AddressBook class lab assignment]] and any other missing assignments
| |
− | * Submit your AddressBook and AddressBookMain on-line to Mr. Bui's SchoolWebLockers
| |
− | * Review Selection Sort
| |
− | * 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 to Mr. Bui at the end of class today
| |
− | * Introduction to Program Dossier
| |
− | ** [[Media:CriterionA1_problemAnalysis.doc]]
| |
− | | |
− | '''Homework:'''
| |
− | * Complete your [[AddressBook class lab assignment]] AND [[Media:SelectionSort.java]]
| |
− | * Have a 1 sentence description of your dossier ready at the beginning of next class
| |
− | | |
− | == Wednesday (9/30/09) ==
| |
− | * [[AddressBook class lab assignment]] is due at the halfway point today.
| |
− | * 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://web.engr.oregonstate.edu/~minoura/cs162/javaProgs/sort/SelectSort.html 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 to Mr. Bui at the end of class or at the beginning of class on Friday
| |
− | | |
− | == Back to School Night ==
| |
− | * [[Media:B2snIBCS2.ppt]]
| |
− | | |
− | == Monday (9/28/09) ==
| |
− | '''Warmup:'''
| |
− | * Create a Java program called ArrayWarmup
| |
− | * Declare and initialize an int array of 10 numbers (I don't care what)
| |
− | * Write a for loop that traverses the array and prints all the numbers out
| |
− | | |
− | '''Agenda:'''
| |
− | * [[AddressBook class lab assignment]]
| |
− | | |
− | == Thursday (9/24/09) ==
| |
− | * Demo your Person, Car, and Contact classes to Mr. Bui
| |
− | * Array review
| |
− | ** [[Media:IntroArrays.ppt]]
| |
− | * Contact arrays
| |
− | * AddressBook overview
| |
− | * [[AddressBook class lab assignment]]
| |
− | | |
− | '''Homework:'''
| |
− | * Complete [[AddressBook class lab assignment]] by Monday (9/28/09)
| |
− | | |
− | == Tuesday (9/22/09) ==
| |
− | * College Presentation with Ms. Settlemyer
| |
− | | |
− | == Friday (9/18/09) ==
| |
− | '''Warmup:'''
| |
− | * Demo your Person and Car classes to Mr. Bui
| |
− | | |
− | '''Agenda:'''
| |
− | * Questions about installing Java and JCreator at home
| |
− | * [[Contact class lab assignment]]
| |
− | | |
− | '''Homework:'''
| |
− | * [[How to install Java on Windows]]
| |
− | * [[How to install JCreator]]
| |
− | * Complete the [[Car class lab assignment]]
| |
− | * Complete [[Contact class lab assignment]]
| |
− | | |
− | == Wednesday (9/16/09) ==
| |
− | '''Warmup:'''
| |
− | * Complete the Circle class with the following methods:
| |
− | ** Circle()
| |
− | ** getRadius()
| |
− | ** setRadius()
| |
− | ** getDiameter()
| |
− | ** getArea()
| |
− | | |
− | '''Agenda:'''
| |
− | * Classes and objects review
| |
− | * Create a CircleMain class that tests the above methods
| |
− | ** [[Media:Circle.java]]
| |
− | ** [[Media:CircleMain.java]]
| |
− | * [[Person class lab assignment]]
| |
− | * Demo your Person and Car classes to Mr. Bui at the beginning of next class
| |
− | | |
− | '''Homework:'''
| |
− | * [[How to install Java on Windows]]
| |
− | * [[How to install JCreator]]
| |
− | * Complete the [[Car class lab assignment]]
| |
− | * Test your Java and JCreator installs by creating, compiling, and executing a Hello, World! program
| |
− | | |
− | == Monday (9/14/09) ==
| |
− | '''Warmup:'''
| |
− | * Be sure that you have completed the Hello, world Java programs from last week
| |
− | | |
− | '''AddressBookMenu Warmup'''
| |
− | * You will be creating a user interface menu for use with your AddressBook
| |
− | * Open / create your AddressBook's main method
| |
− | * Print out a message that explains the program (e.g. "Welcome to YOUR_NAME's address book!")
| |
− | * Print out a menu with the following options:
| |
− | | |
− | <pre>
| |
− | (a)dd to address book
| |
− | (p)rint address book
| |
− | (q)uit
| |
− | | |
− | What would you like to do?
| |
− | </pre>
| |
− | | |
− | * You should prompt for input after the menu is printed. Review [[Media:JavaIOExample.java]] for examples of input/output
| |
− | * If the user inputs 'a', then print a message that says "USER SELECTED ADD"
| |
− | * If the user inputs 'p', then print a message that says "USER SELECTED PRINT"
| |
− | * If the user inputs 'q', then print a message that says "USER SELECTED QUIT"
| |
− | | |
− | '''Agenda:'''
| |
− | * [[Media:IntroClasses.ppt]]
| |
− | * [[Media:IntroObjects.ppt]]
| |
− | | |
− | '''Homework:'''
| |
− | * [[How to install Java on Windows]]
| |
− | * [[How to install JCreator]]
| |
− | * Test your Java and JCreator installs by creating, compiling, and executing a Hello, World! program
| |
− | | |
− | == Thursday (9/10/09) ==
| |
− | * Reminder: Summer assignment due at the beginning of class next Tuesday (9/15/09)
| |
− | * [http://spreadsheets.google.com/viewform?key=p6_k1SMbS2zvMHJNJBBkFPA Student Survey]
| |
− | ** Fill out and submit
| |
− | ** Share several snippets with class
| |
− | * On-line Resources
| |
− | ** [http://www.paulbui.net/wl/cs2 Old IBCS2 website]
| |
− | ** [http://www.eimacs.com EIMACS] - test your login
| |
− | ** [http://www.turingscraft.com Turingscraft] - login coming soon!
| |
− | * A gentle re-introduction to Java
| |
− | ** [[Media:IntroJava.ppt]]
| |
− | ** [[Media:IntroJava2.ppt]]
| |
− | * JEdit
| |
− | * Java Review Programs
| |
− | # Write a Hello, world! program ( Hint: [[Java program template]] )
| |
− | ## Create a new Java program using JEdit or whatever editor you prefer
| |
− | ## Use the Java program template as a guide
| |
− | ## Insert your code
| |
− | ## Compile and execute your code
| |
− | ### Open terminal
| |
− | ### Navigate to your Java file
| |
− | ### ''javac FILENAME''
| |
− | ### Execute your code: ''java PROGRAM_NAME''
| |
− | # Write a program that prints Hello, world 20 times (You may login to eimacs to remember how)
| |
− | # Write a program that prints Hello, world infinite times
| |
− | * Program dossier introduction
| |
− | ** [http://www.ib-computing.com/html/java/dossier/choices.html IB Computing Dossier suggestions]
| |
− | | |
− | == Tuesday (9/8/09) ==
| |
− | * Introductions
| |
− | * [[IB Computer Science II Syllabus]]
| |
− | * 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 System -> Preferences -> About Me -> Change Password
| |
− | | |
− | == Summer Break ==
| |
− | * [[IBCS2 Summer Assignment]]
| |
− | | |
− | <!--
| |
− | == Archives ==
| |
− | * [[IBCS2 - May]]
| |
− | * [[IBCS2 - April]]
| |
− | * [[IBCS2 - March]]
| |
− | * [[IBCS2 - February]]
| |
− | * [[IBCS2 - January]]
| |
− | * [[IBCS2 - December]]
| |
− | * [[IBCS2 - November]]
| |
− | * [[IBCS2 - October]]
| |
− | * [[IBCS2 - September]]
| |
− | -->
| |