Difference between revisions of "IB Computer Science 2"

From WLCS
(34 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
== Thursday - Monday (12/6/18 - 12/10/18) ==
 +
'''Agenda:'''
 +
* Work on Dynamic Queue Documentation assignment - due in Canvas by '''Sunday (12/9/18)'''
 +
* Dynamic queue implementation
 +
* Linked Lists
 +
** Traversing through a LL
 +
** Adding an item to a LL
 +
** Deleting an item from a LL
 +
** Modifying an item in a LL
 +
** Searching for an item in a LL
 +
* Types of Linked Lists
 +
** Singly-linked lists
 +
*** [https://visualgo.net/en/list VisuAlgo - LL]
 +
** Doubly-linked lists
 +
*** [https://visualgo.net/en/list VisuAlgo - DLL] (click on DLL)
 +
** Circular linked lists
 +
* NetBeans GUI walk-through and review
 +
 +
== Tuesday (12/4/18) ==
 +
'''Warmup:'''
 +
* Complete the Stacks Warmup in Canvas
 +
* [https://www.cs.usfca.edu/~galles/visualization/StackLL.html Dynamic Stack Visualization]
 +
 +
'''Agenda:'''
 +
* Programming with nodes and terminology:
 +
** node
 +
** data / cargo
 +
** pointers, reference variables or references
 +
** next reference
 +
** null
 +
* More advanced documents w/ headers, page breaks, and table of contents
 +
* Dynamic Queue Documentation Assignment
 +
*# You may use this [https://www.cs.usfca.edu/~galles/visualization/QueueLL.html Dynamic Queue Visualization] to help you
 +
*# Create a Google document - it will have 3 sectioned headers
 +
*# Use headers (literally) for each of the following sections: '''isEmpty(), enqueue(data) / add(data), dequeue()'''
 +
*# Illustrate the memory diagram using nodes for isEmpty()
 +
*# Describe what is being shown in the illustration (using numbered steps if it helps)
 +
*# Illustrate the memory diagram using nodes for enqueue(data) / add(data) - before and after images!
 +
*#* Diagram the special case of enqueueing to an empty queue
 +
*#* Diagram the general case for enqueue
 +
*# Describe what is being shown in the illustrations (using numbered steps if it helps)
 +
*# Illustrate the memory diagram using nodes for dequeue() / remove() - before and after images!
 +
*#* Diagram the special case of dequeueing when there is only one node in the queue as well as
 +
*#* Diagram the general case for dequeue
 +
*# Describe what is being shown in the illustrations (using numbered steps if it helps)
 +
*# Submit your document to Canvas by '''Friday (12/7/18)'''
 +
 +
== Friday (11/30/18) ==
 +
'''Agenda:'''
 +
* Group 4 Project Debrief
 +
* [https://goo.gl/forms/0ya5UJ6KdVJvDvJF3 Group 4 Project Reflection Google Form]
 +
** Complete this form even if you already turned in a PDF
 +
** You may copy the reflection that you wrote in your PDF and paste it into the form
 +
* Node Quiz
 +
* Circular Queue demos
 +
* Dynamic Stack notes - before & after images with Nodes
 +
*# What are the different illustrations/diagrams of the stack in different situations?
 +
*# What would the diagram(s) look like after a push() or pop() operation?
 +
* Complete [[Java - Dynamic Stack Assignment]] as a class
 +
* Maze generation algorithm using a stack
 +
 +
== Wednesday (11/28/18) ==
 +
* Most students will be attending the Group 4 Project field trip
 +
* If you are not attending, go to Ms. Smith's room (#4026)
 +
* Work on any missing assignments
 +
* Study for '''Node Quiz on Friday (11/30/18)'''
 +
* Work on [[Java - Dynamic Stack Assignment]]
 +
 +
== Monday (11/26/18) ==
 +
'''Agenda:'''
 +
* Group 4 Project Field Trip (Wednesday-Thursday 11/28-11/29)
 +
** If you are attending, check-in and orientation at the auditorium at 8:19am
 +
** If you are not attending, 4th and 6th periods, go to Ms. Smith's room (#4026)
 +
* Assignments thus far.  Demo missing assignments during GP:
 +
** Poker Hands: Part 1
 +
** Poker Hands: Part 2 (repl.it submission coming soon)
 +
** Static Queue
 +
** Circular Queue
 +
* Object and References Review - Using JGrasp
 +
** [[Media:Point.java]]
 +
** [[Media:ReferencesReview.java]]
 +
* Node class
 +
** [[Media:Node.java]]
 +
** [[NodeDemo.java]]
 +
** [[AnotherNodeDemo.java]]
 +
* More Node Practice!
 +
* '''Node Quiz on Friday (11/30/18)'''
 +
** 2 questions
 +
** If given code, you can draw a memory diagram illustration
 +
** If given a memory diagram illustration, you can write the code to create it
 +
* [https://www.cs.usfca.edu/~galles/visualization/StackLL.html Dynamic Stack Visualization]
 +
* Work on [[Java - Dynamic Stack Assignment]]
 +
 +
== Monday (11/19/18) ==
 +
'''Agenda:'''
 +
* Ensure that you've installed NetBeans and JGrasp
 +
* NVCC Dual Enrollment forms?
 +
* Workplace Readiness Skills: Pre-assessment
 +
* Assignments thus far:
 +
** Poker Hands: Part 1
 +
** Poker Hands: Part 2 (repl.it submission coming soon)
 +
** Static Queue
 +
** Circular Queue
 +
* Queue questions?
 +
** Quiz will be after lunch (at the halfway point of class)
 +
* Demo assignments
 +
 +
== Thursday (11/15/18) ==
 +
'''Agenda:'''
 +
* Demo your [[Java - Static Queue Assignment]]
 +
* Complete the circular queue challenge extension in the [[Java - Static Queue Assignment]].  Be sure you save as a new project or file and rename the class to CircularQueue.  Do not overwrite your StaticQueue code!
 +
* Demo your circular queue
 +
* '''Queue quiz on Monday (11/19/18) '''
 +
 
== Tuesday (11/13/18) ==
 
== Tuesday (11/13/18) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Introduction to Queues - [[https://docs.google.com/presentation/d/1Wckb8R3om4RGi9O8HWu0yYdkaFek5y0_GI1ak0H89yU/edit?usp=sharing Queue slides]]
+
* Stacks Quiz makeups
 +
* NVCC Dual Enrollment application
 +
* Introduction to Queues - [https://docs.google.com/presentation/d/1Wckb8R3om4RGi9O8HWu0yYdkaFek5y0_GI1ak0H89yU/edit?usp=sharing Queue slides]
 
* Play with the [https://www.cs.usfca.edu/~galles/visualization/QueueArray.html Queues Array Implementation]
 
* Play with the [https://www.cs.usfca.edu/~galles/visualization/QueueArray.html Queues Array Implementation]
 
*# What attributes of a queue should we keep track of?
 
*# What attributes of a queue should we keep track of?
Line 44: Line 160:
 
*# There will be some repl.it practice assignments for Stack
 
*# There will be some repl.it practice assignments for Stack
 
*# There will be a future stack quiz -- so read all the code
 
*# There will be a future stack quiz -- so read all the code
 
== Tuesday (10/30/18) ==
 
'''Agenda:'''
 
* Turn in Group 4 Project Permission slip
 
* Turn in Dual Enrollment form
 
* Create a demonstration program for your sort() and shuffle() methods
 
* Poker Hand Methods w/ arrays
 
** int getHighCardValue(Card[] cards)
 
*** returns the value of the highest Card (Hint: Use find maximum algorithm)
 
** boolean checkPair(Card[] cards)
 
*** returns true if any two Cards have the same value, false otherwise
 
*** You may want to sort the cards before you look for a pair of matching cards
 
** boolean checkTwoPair(Card[] cards)
 
*** returns true if there are two pairs of Cards have the same value, false otherwise
 
*** You may want to sort the cards before you look for two pair
 
** boolean checkThreeOfAKind(Card[] cards)
 
*** returns true if there are three Cards have the same value, false otherwise
 
*** You may want to sort the cards before you look for three of a kind
 
** Continue implementing boolean check methods for the other poker hands:
 
*** straight, flush, full house, four of a kind, straight flush, royal flush
 
*** Hint: You can actually use some method calls to the other methods in several of the method definitions (e.g. You can call checkStraight() and checkFlush() to make checkStraightFlush() easier)
 
 
== Friday (10/26/18) ==
 
'''Warmup:'''
 
* Group 4 Project permission slips!
 
* Check if you have NetBeans and JGrasp installed...we will be starting to use them more
 
* Complete [[Card class lab assignment]] (tests can be found via repl.it)
 
 
'''Agenda:'''
 
* Class Construction Quiz
 
* Intro Poker Hand Methods
 
** int getHighCardValue(Card c0, Card c1, Card c2, Card, c3, Card c4)
 
*** returns the value of the highest Card
 
** Do not continue with the other poker hand methods like above b/c we will be making new versions using arrays!
 
* Introduction to Arrays of Objects
 
** Walkthrough -- take notes!  Pay attention!
 
* Basic Card[] methods - implement the following, test, and demo for credit
 
** void printCards(Card[] cards) - we will do this one together
 
*** Use a for loop to iterate through all the cards, and print them to the screen
 
** void shuffle(Card[] cards)
 
**# Write a for loop that runs a bunch of times (e.g. 10000)
 
**# Generate two random numbers from 0 to the length of cards
 
**# Swap the cards at the locations of the two random numbers
 
** void sort(Card[] cards)
 
*** Implement either selection sort or bubble sort to sort your Card[] array.  You can literally copy and paste your sorting code from before, and then tweak it to use the value of the cards (i.e. getValue())
 
*** You should be able to test your code by generating a bunch of cards, sorting it, and then printing it out.  They should display in order of value.
 
 
'''Homework:'''
 
* Implement the sort() and shuffle() methods for Card[]
 
 
== Wednesday (10/24/18) ==
 
'''Agenda:'''
 
* Make sure you've completed all the class construction assignments in Repl.it
 
* Make sure you've installed NetBeans
 
* [[Card class lab assignment]]
 
* We will create poker hand methods to determine whether or not a Card[5] array contains a particular poker hand
 
* Quiz on Friday on class construction
 
** How do you study for this quiz?  Do all the class construction homework...duh
 
 
== Monday (10/22/18) ==
 
'''Agenda:'''
 
* Complete Point class assignment in repl.it
 
* [[Car class lab assignment]] - submit for testing in repl.it
 
* [[Vector class lab assignment]] - submit for testing in repl.it
 
 
== Thursday (10/18/18) ==
 
'''Agenda:'''
 
* Go to your App Catalog and look for NetBeans -- is it there?
 
* Demo Mosaic and Pointilism assignment(s) today
 
* Java Objects Slides
 
** [https://docs.google.com/presentation/d/1hb_8wMUlQQl7W-JF2f3gax021yDHLkLENJYy0fUMGy8/edit?usp=sharing Classes (Java) slides]
 
** [https://docs.google.com/presentation/d/1ks5B3fsnGCX_utk_Adxt1cQtPtUsNtNVENb9swCaHpo/edit?usp=sharing Object Usage (Java) slides]
 
** [https://docs.google.com/presentation/d/1Vq2mTZRJIBkwpsHqFmKRICpUOoqOOSKSyRKWMGKZovY/edit?usp=sharing Object-Oriented Programming (Java) slides]
 
* Point class assignment - complete in NetBeans or repl.it (*must* submit to repl.it for auto-testing)
 
*# You will create two java files: '''Point.java''' and '''Main.java'''
 
*#* '''Point.java''' - the Point class definition will be here
 
*#* '''Main.java''' - only the main() method will be located here
 
*# Declare and initialize the following '''private''' attributes in the Point class
 
*#* double x = 0.0
 
*#* double y = 0.0
 
*# Define two Point() constructors:
 
*#* default constructor: Point()
 
*#* specific constructor Point(double newX, double newY)
 
*# Define the following '''public''' methods in the Point class
 
*#* double getX() - returns the x-coordinate
 
*#* double getY() - returns the y-coordinate
 
*#* void setX(double newX) - sets the x-coordinate to the new x-coordinate parameter
 
*#* void setY(double newY) - sets the y-coordinate to the new y-coordinate parameter
 
*#* String toString() - returns a String representation of the Point object
 
*# Go to your Main.java file to test out your Point class
 
*# In the main method, create several new instances of Point objects
 
*# Print out each of your Point objects
 
*# Define a static method in Main.java named '''double slope(Point p1, Point p2)''' - returns the slope between p1 and p2
 
*# Test and print out your slope method when you use it with your instantiated Point objects in the main() method
 
* More Java class assignments - complete in NetBeans or repl.it (*must* submit to repl.it for auto-testing)
 
** Mr. Bui is still in the process of creating the repl.it test cases
 
** [[Car class lab assignment]]
 
** [[Vector class lab assignment]]
 
 
== Tuesday (10/16/18) ==
 
'''Agenda:'''
 
* Creating a blank image and manipulating the pixels
 
*# Rotate 90 degrees clockwise
 
* Complete and demo the following image processing assignments:
 
*# Rotate 90 degrees clockwise of a non-square image (no animation needed)
 
*# Mosaic (no animation needed)
 
*## Take an image, sample every (10th row, 10th col) pixel's color
 
*## Draw a 10x10 square using the sampled pixel's color at ever 10th (x,y)
 
*## You should display both the original image and its mosaic
 
*# Pointilism Animation
 
*## This will be an animation
 
*## Within setup(), load an image, load its pixels, and turn off line strokes
 
*## Within draw(), generate a random index number from 0 to image's pixel length (use [https://processing.org/reference/random_.html random()])
 
*##* int rand = (int) random(0, img.pixels.length);
 
*## Sample the color of the pixel from the random index and fill with the color
 
*## Calculate the appropriate (x,y) from the random index (Hint: use modulus (%) for x and division (/) for y)
 
*## Draw the circle at its appropriate (x,y) using a random diameter from (5, 15)
 
 
'''Homework:'''
 
* All of the image processing assignments are due Thursday (10/18/18)
 
 
== Tuesday - Friday (10/9/18 - 10/12/18) ==
 
'''Agenda:'''
 
* Demo [[Media:BubbleSort.java]]
 
* Algorithms Identification Quiz in Canvas
 
* Reference variables overview
 
* Two-Dimensional Arrays and Nested Loops
 
*# Accessing all of the individual elements of a two-dimensional list
 
*# Prompt the user to construct a two-dimensional list
 
*## Prompt for the number of rows
 
*## Prompt for the number of columns
 
*## Prompt the user for each number in the two-dimensional list
 
*# Write a method: '''void matrixPrint(int[][] m)'''
 
*#* Print each row on a separate line, and each element should be separated by a space
 
*#* Complete the method in repl.it
 
<!--
 
*# Write a method (function): '''double[][] matrixAdd(double[][] m1, double[][] m2)''' that returns a new matrix that is the sum of m1 and m2
 
*#* Be sure to check if the two matrices are the same size (if not, then return null)
 
-->
 
* Nested Loops, Processing & Images
 
** Processing coordinate system review (print mouse coordinates)
 
** Processing PImage object practice
 
** [https://www.processing.org/tutorials/pixels/ Processing: Images & Pixels Tutorial]
 
** As a class, we'll walk through several of the examples from the tutorial above, and we'll modify each slightly
 
* Image Processing Exercises?
 
*# Convert to black and white
 
*# Rotate image 90 degrees
 
*# Flip vertical
 
*# Flip horizontal
 
*# Pointilism
 
*# Mosaic
 
*# Edge detection?
 
 
'''Homework Challenge:'''
 
* Try to complete the rotate 90 degrees image challenge
 
 
== Thursday (10/4/18) ==
 
'''Agenda:'''
 
* Make sure you've completed Selection Sort in repl.it
 
** Mr. Bui will be manually looking at your repl.it submissions too
 
* Take the Sorting Identification Quiz in Canvas
 
** The access code is ...
 
* Bubble sort review
 
* Complete and demo [[Media:BubbleSort.java]]
 
 
== Tuesday (10/2/18) ==
 
'''Warmup:'''
 
* Take the Abstract Data Structures Pre-assessment on Canvas
 
** Do not guess answers, skip them if you do not know the answer
 
* Complete the Find Minimum & Maximum repl.it
 
 
'''Agenda:'''
 
* Group sorting activity
 
*# Form 3-4 person groups
 
*# Receive playing cards
 
*# With your group, document an algorithm (steps) of how you sort the cards out
 
* Introduction to Sorting
 
** [https://docs.google.com/presentation/d/1Y5JOINM2w744nqimZf2iVuFpi6N6gM2B7GM4ArGjChQ/edit?usp=sharing Sorting slides]
 
* Selection sort assignment in repl.it
 
  
 
== Archives ==
 
== Archives ==
 +
* [[IBCS2 - 1819 - October]]
 
* [[IBCS2 - 1819 - September]]
 
* [[IBCS2 - 1819 - September]]
 
* [[IBCS2 Summer Assignment]]
 
* [[IBCS2 Summer Assignment]]
 
* [[IBCS2 - 1718]]
 
* [[IBCS2 - 1718]]

Revision as of 10:41, 10 December 2018

Thursday - Monday (12/6/18 - 12/10/18)

Agenda:

  • Work on Dynamic Queue Documentation assignment - due in Canvas by Sunday (12/9/18)
  • Dynamic queue implementation
  • Linked Lists
    • Traversing through a LL
    • Adding an item to a LL
    • Deleting an item from a LL
    • Modifying an item in a LL
    • Searching for an item in a LL
  • Types of Linked Lists
  • NetBeans GUI walk-through and review

Tuesday (12/4/18)

Warmup:

Agenda:

  • Programming with nodes and terminology:
    • node
    • data / cargo
    • pointers, reference variables or references
    • next reference
    • null
  • More advanced documents w/ headers, page breaks, and table of contents
  • Dynamic Queue Documentation Assignment
    1. You may use this Dynamic Queue Visualization to help you
    2. Create a Google document - it will have 3 sectioned headers
    3. Use headers (literally) for each of the following sections: isEmpty(), enqueue(data) / add(data), dequeue()
    4. Illustrate the memory diagram using nodes for isEmpty()
    5. Describe what is being shown in the illustration (using numbered steps if it helps)
    6. Illustrate the memory diagram using nodes for enqueue(data) / add(data) - before and after images!
      • Diagram the special case of enqueueing to an empty queue
      • Diagram the general case for enqueue
    7. Describe what is being shown in the illustrations (using numbered steps if it helps)
    8. Illustrate the memory diagram using nodes for dequeue() / remove() - before and after images!
      • Diagram the special case of dequeueing when there is only one node in the queue as well as
      • Diagram the general case for dequeue
    9. Describe what is being shown in the illustrations (using numbered steps if it helps)
    10. Submit your document to Canvas by Friday (12/7/18)

Friday (11/30/18)

Agenda:

  • Group 4 Project Debrief
  • Group 4 Project Reflection Google Form
    • Complete this form even if you already turned in a PDF
    • You may copy the reflection that you wrote in your PDF and paste it into the form
  • Node Quiz
  • Circular Queue demos
  • Dynamic Stack notes - before & after images with Nodes
    1. What are the different illustrations/diagrams of the stack in different situations?
    2. What would the diagram(s) look like after a push() or pop() operation?
  • Complete Java - Dynamic Stack Assignment as a class
  • Maze generation algorithm using a stack

Wednesday (11/28/18)

  • Most students will be attending the Group 4 Project field trip
  • If you are not attending, go to Ms. Smith's room (#4026)
  • Work on any missing assignments
  • Study for Node Quiz on Friday (11/30/18)
  • Work on Java - Dynamic Stack Assignment

Monday (11/26/18)

Agenda:

  • Group 4 Project Field Trip (Wednesday-Thursday 11/28-11/29)
    • If you are attending, check-in and orientation at the auditorium at 8:19am
    • If you are not attending, 4th and 6th periods, go to Ms. Smith's room (#4026)
  • Assignments thus far. Demo missing assignments during GP:
    • Poker Hands: Part 1
    • Poker Hands: Part 2 (repl.it submission coming soon)
    • Static Queue
    • Circular Queue
  • Object and References Review - Using JGrasp
  • Node class
  • More Node Practice!
  • Node Quiz on Friday (11/30/18)
    • 2 questions
    • If given code, you can draw a memory diagram illustration
    • If given a memory diagram illustration, you can write the code to create it
  • Dynamic Stack Visualization
  • Work on Java - Dynamic Stack Assignment

Monday (11/19/18)

Agenda:

  • Ensure that you've installed NetBeans and JGrasp
  • NVCC Dual Enrollment forms?
  • Workplace Readiness Skills: Pre-assessment
  • Assignments thus far:
    • Poker Hands: Part 1
    • Poker Hands: Part 2 (repl.it submission coming soon)
    • Static Queue
    • Circular Queue
  • Queue questions?
    • Quiz will be after lunch (at the halfway point of class)
  • Demo assignments

Thursday (11/15/18)

Agenda:

  • Demo your Java - Static Queue Assignment
  • Complete the circular queue challenge extension in the Java - Static Queue Assignment. Be sure you save as a new project or file and rename the class to CircularQueue. Do not overwrite your StaticQueue code!
  • Demo your circular queue
  • Queue quiz on Monday (11/19/18)

Tuesday (11/13/18)

Agenda:

Thursday (11/8/18)

Agenda:

  • Mr. Bui is out b/c his son is sick. There will be a closed-book, closed-person quiz on stacks halfway through class. Use the first half of class to review all the stack material and to interact with the stack array implementation
  • If you have not already done so, complete your submission to Poker Hands: Part 1
  • Introduction to Stacks - Stacks slides
    • Be able to describe the characteristics of a stack
    • Be able to explain the operations of a stack
    • Be able to describe different stack applications
    • If given a list or an array, be able to explain their use as stacks
    • Be able to implement the programming code for a stack that uses an array
  • Study the code in Media:Stack.java and Media:StackMain.java
  • Halfway through class...take the Stack Quiz

Thursday - Monday (11/1/18 - 11/5/18)

Agenda:

  • Turn in Group 4 Project Permission slip
  • Turn in Dual Enrollment form
  • Complete Poker Hand Methods w/ arrays
    • NOTE: If you want to check if two strings match (e.g. String s and String s2) you must use s.equals(s2)
  • Create your own test cases...try to use multiple tests per method
  • Here is a list of cards and the integer values to create them
  • Here are several test cases and the integer values to create them. Note, I'm only give you test cases for the first few poker hands, you should be able to create your own for the rest
  • Complete Poker Hands: Part 1 today in repl.it
    • First grade of the 2nd quarter
  • Introduction to Stacks - Stacks slides
    • Be able to describe the characteristics of a stack
    • Be able to explain the operations of a stack
    • Be able to describe different stack applications
    • If given a list or an array, be able to explain their use as stacks
  • Data Structure Visualizations
  • Static-sized Stack class walk-through
    1. Read through and analyze ALL the code for Media:Stack.java
    2. Create a new project and include Media:Stack.java and Media:StackMain.java
    3. Test out Media:Stack.java and Media:StackMain.java
    4. There will be some repl.it practice assignments for Stack
    5. There will be a future stack quiz -- so read all the code

Archives