Difference between revisions of "IBCS2 - September"

From WLCS
Line 1: Line 1:
−
<!--
+
== Wednesday (9/30/09) ==
−
== Monday - Tuesday (9/29/08 - 9/30/08) ==
+
* [[AddressBook class lab assignment]] is due at the halfway point today.
−
* Evaluate draft "Analysis of the Problem"
+
* Introduction to Selection Sort
−
* Turn in "Analysis of the Problem"
+
# Find the smallest element
−
* Demo StringBinarySearch.java by the end of Wednesday
+
# Move to the front of the array (swap with front)
−
* Demo AddressBook's selectionSort() and bubbleSort() by the end of Wednesday
+
# Repeat Steps 1&2, but ignoring the sorted front
−
* Register for a [http://www.turingscraft.com turingscraft] account using TC-0483-0 as the section code.
+
* [http://web.engr.oregonstate.edu/~minoura/cs162/javaProgs/sort/SelectSort.html Selection Sort Animation]
−
** Test the interface and attempt the first several problems
+
* [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
  
−
== Friday (9/26/08) ==
+
== Back to School Night ==
−
* Reminder: 1st draft of "Analysis of the Problem" due on Monday!!!
+
* [[Media:B2snIBCS2.ppt]]
  
−
* Sorting & Searching Review
+
== Monday (9/28/09) ==
−
** Selection Sort
+
'''Warmup:'''
−
** Bubble Sort
+
* Create a Java program called ArrayWarmup
−
** Linear Search
+
* Declare and initialize an int array of 10 numbers (I don't care what)
−
** Binary Search
+
* Write a for loop that traverses the array and prints all the numbers out
−
* 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.
+
'''Agenda:'''
−
* 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.
+
* [[AddressBook class lab assignment]]
−
* Demo the two sorting methods to Mr. Bui by the end of Monday.
 
  
−
== Thursday (9/25/08) ==
+
== Thursday (9/24/09) ==
−
* Introduction to Linear Search
+
* Demo your Person, Car, and Contact classes to Mr. Bui
−
* Download [[Media:LinearSearch.java]]
+
* Array review
−
* Fill in the commented parts of LinearSearch.java and demo a working linear search to Mr. Bui
+
** [[Media:IntroArrays.ppt]]
−
* Linear Search performance evaluation
+
* Contact arrays
−
# What is the best case scenario? i.e. What is the minimum # of comparisons?
+
* AddressBook overview
−
# What is the worst case scenario? i.e. What is the maximum # of comparisons?
+
* [[AddressBook class lab assignment]]
−
# What is the average # of comparisons?
 
−
# Can we do better than a linear search?
 
  
−
* Introduction to Binary Search
+
'''Homework:'''
−
# Assume sorted list
+
* Complete [[AddressBook class lab assignment]] by Monday (9/28/09)
−
# 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]
+
== Tuesday (9/22/09) ==
−
* [http://www.cosc.canterbury.ac.nz/people/mukundan/dsal/BSearch.html Binary Search Demo2]
+
* College Presentation with Ms. Settlemyer
−
* [[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
 
  
−
== Wednesday (9/24/08) ==
+
== Friday (9/18/09) ==
−
* Demo missing assignments
 
−
* Dossier
 
−
** Past examples
 
−
** Work on your Analysis of the Problem section
 
−
 
 
−
== Back to School Night ==
 
−
* [[Media:B2snIBCS2.ppt]]
 
−
 
 
−
== Monday - Tuesday (9/22/08 - 9/23/08) ==
 
 
'''Warmup:'''
 
'''Warmup:'''
−
* Assume you have the following integers: 5, 2, 3, 8, 4
+
* Demo your Person and Car classes to Mr. Bui
−
* What are the steps to selection sort the integers?  Show the movement of the integers.
 
−
* '''What are the steps to bubble sort the integers?  Show the movement of the integers.'''
 
  
 
'''Agenda:'''
 
'''Agenda:'''
−
* Demo SelectionSort.java to Mr. Bui
+
* Questions about installing Java and JCreator at home
−
* Introduction to Bubble Sort
+
* [[Contact class lab assignment]]
−
# 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 Monday (9/29/08)
 
  
−
'''Assignment:'''
+
'''Homework:'''
−
* Verify that you have Java and JCreator installed on your home computer.
+
* [[How to install Java on Windows]]
 +
* [[How to install JCreator]]
 +
* Complete the [[Car class lab assignment]]
 +
* Complete [[Contact class lab assignment]]
  
−
== Friday (9/19/08) ==
+
== Wednesday (9/16/09) ==
−
* Introduction to Selection Sort
+
'''Warmup:'''
−
# Find the smallest element
+
* Complete the Circle class with the following methods:
−
# Move to the front of the array (swap with front)
+
** Circle()
−
# Repeat Steps 1&2, but ignoring the sorted front
+
** getRadius()
−
* [http://web.engr.oregonstate.edu/~minoura/cs162/javaProgs/sort/SelectSort.html Selection Sort Animation]
+
** setRadius()
−
* [http://www.cs.ust.hk/faculty/tcpong/cs102/summer96/aids/select.html Another Selection Sort Animation]
+
** getDiameter()
−
* Download [[Media:SelectionSort.java]]
+
** getArea()
−
** 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 Monday
 
  
−
== Wednesday - Thursday (9/17/08 - 9/18/08) ==
 
 
'''Agenda:'''
 
'''Agenda:'''
−
* [[AddressBook class lab assignment]] is due at the end of the day tomorrow.
+
* Classes and objects review
−
* Your AddressBook demo should use the menu system you created in the warmup yesterday
+
* Create a CircleMain class that tests the above methods
−
** When the user selects to ADD a Contact, you should prompt them for a first name, last name, phone, and address.
+
** [[Media:Circle.java]]
−
** You should then create a new Contact
+
** [[Media:CircleMain.java]]
−
** Add the Contact to your AddressBook using the AddressBook's add() method
+
* [[Person class lab assignment]]
−
* The PRINT menu choice should print the entire AddressBook using the print() method
+
* Demo your Person and Car classes to Mr. Bui at the beginning of next class
−
* Make sure your menu runs again after the user makes a choice (HINT: use a loop somewhere)
 
  
−
== Tuesday (9/16/08) ==
+
'''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:'''
 
'''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
 
* You will be creating a user interface menu for use with your AddressBook
 
* Open / create your AddressBook's main method
 
* Open / create your AddressBook's main method
Line 133: Line 98:
  
 
'''Agenda:'''
 
'''Agenda:'''
−
* Demo JCreator
 
−
* Add a String address attribute to your Contact class
 
−
* Demo your Person, Car, and Contact classes to Mr. Bui (LATE)
 
−
* [[AddressBook class lab assignment]]
 
−
 
−
== Monday (9/15/08) ==
 
−
* Demo your Person, Car, and Contact classes to Mr. Bui
 
−
* AddressBook overview
 
−
* [[AddressBook class lab assignment]]
 
−
 
−
== Wednesday - Friday (9/10/08 - 9/12/08) ==
 
−
* Receive textbooks
 
−
** Write your name on the inside cover
 
−
** Tell Mr. Bui your number
 
−
* Demo to Mr. Bui your Person, Car, and Contact classes
 
−
* Complete Lab 14 in [http://www.eimacs.com eimacs]
 
−
* Complete Test 12 in [http://www.eimacs.com eimacs]
 
−
 
−
== Monday - Tuesday (9/8/08 - 9/9/08) ==
 
−
 
−
'''Agenda'''
 
 
* [[Media:IntroClasses.ppt]]
 
* [[Media:IntroClasses.ppt]]
−
* [[Person class lab assignment]]
+
* [[Media:IntroObjects.ppt]]
−
* [[Car class lab assignment]]
 
−
* [[Contact class lab assignment]]
 
−
 
 
−
== Friday (9/5/08) ==
 
−
'''Warmup'''
 
−
Determine whether or not each of the following lines result in ''x'' evaluating ''true'' or ''false'':
 
−
 
 
−
<source lang="java" line>
 
−
boolean x;
 
−
x = 50 > 20;
 
−
x = !x;
 
−
x = true && false;
 
−
x = false || false;
 
−
x = false || false || false || false || false || true;
 
−
x = true && true && true && false;
 
−
x = x || !x;
 
−
x = x && !x;
 
−
</source>
 
−
 
 
−
'''Agenda'''
 
−
* A gentle re-introduction to Java
 
−
** [[Media:IntroJava.ppt]]
 
−
** [[Media:IntroJava2.ppt]]
 
−
** [[Media:IntroClasses.ppt]]
 
−
** [[Media:IntroObjects.ppt]]
 
−
** JCreator Demo
 
−
** [[Person class lab assignment]]
 
  
−
'''Assignment'''
+
'''Homework:'''
 
* [[How to install Java on Windows]]
 
* [[How to install Java on Windows]]
 
* [[How to install JCreator]]
 
* [[How to install JCreator]]
 
* Test your Java and JCreator installs by creating, compiling, and executing a Hello, World! program
 
* Test your Java and JCreator installs by creating, compiling, and executing a Hello, World! program
  
−
== Tuesday - Thursday (9/2/08 - 9/4/08) ==
+
== Thursday (9/10/09) ==
−
* Introductions
+
* Reminder: Summer assignment due at the beginning of class next Tuesday (9/15/09)
−
* Syllabus
 
−
* Name cards
 
−
* Lab setup/config
 
 
* [http://spreadsheets.google.com/viewform?key=p6_k1SMbS2zvMHJNJBBkFPA Student Survey]
 
* [http://spreadsheets.google.com/viewform?key=p6_k1SMbS2zvMHJNJBBkFPA Student Survey]
 
** Fill out and submit
 
** Fill out and submit
Line 201: Line 115:
 
** [http://www.eimacs.com EIMACS] - test your login
 
** [http://www.eimacs.com EIMACS] - test your login
 
** [http://www.turingscraft.com Turingscraft] - login coming soon!
 
** [http://www.turingscraft.com Turingscraft] - login coming soon!
−
* Java Review
+
* 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]] )
 
# Write a Hello, world! program ( Hint: [[Java program template]] )
 
## Create a new Java program using JEdit or whatever editor you prefer
 
## Create a new Java program using JEdit or whatever editor you prefer
Line 211: Line 129:
 
### ''javac FILENAME''
 
### ''javac FILENAME''
 
### Execute your code: ''java PROGRAM_NAME''
 
### Execute your code: ''java PROGRAM_NAME''
−
# Write a program that prints Hello, world 20 times
+
# 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
 
# Write a program that prints Hello, world infinite times
 
* Program dossier introduction
 
* Program dossier introduction
−
** [http://www.ib-computing.com/java/dossier/choices.html IB Computing Dossier suggestions]
+
** [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]]

Revision as of 11:39, 21 October 2009

Wednesday (9/30/09)

  1. Find the smallest element
  2. Move to the front of the array (swap with front)
  3. Repeat Steps 1&2, but ignoring the sorted front

Back to School Night

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:

Thursday (9/24/09)

Homework:

Tuesday (9/22/09)

  • College Presentation with Ms. Settlemyer

Friday (9/18/09)

Warmup:

  • Demo your Person and Car classes to Mr. Bui

Agenda:

Homework:

Wednesday (9/16/09)

Warmup:

  • Complete the Circle class with the following methods:
    • Circle()
    • getRadius()
    • setRadius()
    • getDiameter()
    • getArea()

Agenda:

Homework:

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:
(a)dd to address book
(p)rint address book
(q)uit

What would you like to do? 
  • 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:

Homework:

Thursday (9/10/09)

  1. Write a Hello, world! program ( Hint: Java program template )
    1. Create a new Java program using JEdit or whatever editor you prefer
    2. Use the Java program template as a guide
    3. Insert your code
    4. Compile and execute your code
      1. Open terminal
      2. Navigate to your Java file
      3. javac FILENAME
      4. Execute your code: java PROGRAM_NAME
  2. Write a program that prints Hello, world 20 times (You may login to eimacs to remember how)
  3. Write a program that prints Hello, world infinite times

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