|
|
(386 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
− | == Tuesday (10/30/18) == | + | == [[IBCS2 - Archives]] == |
− | '''Agenda:'''
| |
− | * 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 ==
| |
− | * [[IBCS2 - 1819 - September]]
| |
− | * [[IBCS2 Summer Assignment]]
| |
− | * [[IBCS2 - 1718]]
| |