Difference between revisions of "AP Computer Science"

From WLCS
(40 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Thursday (11/1/18) ==
+
== Monday (12/10/19) ==
* While loops quiz
+
'''Agenda:'''
* [https://docs.google.com/presentation/d/1GLpwZbqLcyix2WHqS9lLJT3qCeIeWGQ9UDwr6f9VgoE/edit?usp=sharing Search slides]
+
* Complete Lab 1: Chatter
** Linear Search
+
<!--
** Binary Search
+
** Your project will be auto-graded when you export from NetBeans and upload it to eIMACS
* LS and BS assignments will be posted in Repl.it
+
* For-each (enhanced for) loop
* Complete LS and BS by Monday (11/5/18)
+
** Walk-through and examples
 +
** Common pitfall(s)
 +
** What are the advantages of a regular for loop? Disadvantages?
 +
** What are the advantages of a for-each/enhanced? Disadvantages?
 +
** When do you want to use a regular for loop vs. a for-each/enhanced for loop?
 +
-->
 +
 
 +
'''Homework:'''
 +
* Complete Lab 1: Chatter
 +
<!--* Complete Test 9-->
  
== Tuesday (10/30/18) ==
+
== Thursday (12/6/18) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Demo missing assignments
+
* Go over eIMACS: Test 10 homework
** Last assignment for quarter [[Looping Exercises]]
+
* main method
* [https://docs.google.com/presentation/d/1GLpwZbqLcyix2WHqS9lLJT3qCeIeWGQ9UDwr6f9VgoE/edit?usp=sharing Search slides]
+
* Comments
** Linear Search
+
* Multiple variable declarations (comma-separated)
** Binary Search
+
* Complete Lab 1: Chatter (you will need NetBeans or Eclipse)
* LS and BS assignments will be posted in Repl.it
+
 
 +
== Tuesday (12/4/18) ==
 +
'''Warmup:'''
 +
* Complete #1 of eIMACS: Activity 7: Checksums
  
== Friday (10/26/18) ==
 
 
'''Agenda:'''
 
'''Agenda:'''
* While loops quiz (on paper)
+
* Make sure you have completed all repl.it methods assignments
* Demo [[Monte Carlo Calculation of Pi]]
+
* Complete eIMACS: Activity 11: Strings 2
* Demo [[Taylor Series Pi and e]]
+
** Use the AP CS exam quick reference card
* Complete [[Looping Exercises]]
+
** All methods should be able to be completed using the methods listed in the card
  
== Wednesday (10/24/18) ==
+
'''Homework:'''
 +
* Complete eIMACS: Activity 7 #2
 +
* Complete eIMACS: Test 10
 +
 
 +
== Friday (11/30/18) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Complete and demo [[Monte Carlo Calculation of Pi]] in Java
+
* Search & Sort Identification Quiz
** You will need to use '''Math.random()''' to generate a random value between 0 and 1
+
* for loop demos - Practice 1 & 2
* Complete and demo [[Taylor Series Pi and e]] in Java
+
* Complete for Loop assignments in Repl.it
* Complete all the sequences in [[Looping Exercises]]
+
** Count Words
 +
** double[] Average
 +
** Reverse String Print
 +
* Introduction to Methods
 +
** [https://docs.google.com/presentation/d/1L-tbBp51YuUoTWldXFBr6JGcyHF5sBy_flfPGiqlVAQ/edit?usp=sharing Java Methods slides]
 +
** Java methods examples
 +
** Complete repl.it methods assignments
 +
 
 +
== Monday - Wednesday (11/26/18 - 11/28/18) ==
 +
'''Warmup:'''
 +
* Write a program that takes a String input, uses a for loop, and prints every other letter in the string
  
== Monday (10/22/18) ==
 
 
'''Agenda:'''
 
'''Agenda:'''
* Netbeans in App Catalog?
+
* for loop demos - Practice 1:
* Demo completed Tic-Tac-Toe game
+
*# Monte Carlo Pi
* Iteration - While Loops
+
*# Taylor Series Pi and e
** Basic while loops
+
*# Looping exercises
**# Write a loop that prints 0 to 10 (exclusive)
+
* for loop demos - Practice 2:
**# Write a loop that prints 10 to 0 (inclusive)
+
*# Linear search
**# Write a loop that sums all the numbers from 0 to 1000 (inclusive)
+
*# Binary search
** While loops with strings
+
*# Selection sort
**# Write a loop that prints each character of a String s (you supply the String's value)
+
*# Bubble sort
**# Write a loop that prints every other character of a String s
+
*# Insertion sort
**# Write a loop that prints each character of a String s from end to beginning
+
* Complete for Loop assignments in Repl.it
** While loops with arrays
+
** Count Words
**# Write a loop that prints every element of an int[]
+
** double[] Average
**# Write a loop that prints the square of every element in an int[]
+
** Reverse String Print
**# Write a loop that sums all the numbers of an int[]
+
* Search & Sort Identification Quiz next class
** Complete Test 6 and Test 7
+
** If shown the programming code or visualization of a particular algorithm, you can identify its name
 +
** You may be shown code or visualizations of things that you have not yet learned! You must be able to say that you did not learn it yet
 +
 
 +
== Monday (11/19/18) ==
 +
'''Warmup:'''
 +
* for loops quiz at the end of class
 +
* Prepare to demo for looped version of:
 +
*# Monte Carlo Pi
 +
*# Taylor Series Pi and e
 +
*# Looping exercises
  
== Thursday (10/18/18) ==
 
 
'''Agenda:'''
 
'''Agenda:'''
* Demo Tic-Tac-Toe - Part 2
+
* Repl.it resubmits
* Tic-Tac-Toe - Part 3
+
** Binary search incorrect -- please redo and resubmit
*# Add conditionals to check if any 3 locations match (make sure that at least one of the locations is not equal to the empty string)
+
* for Loop Practice 2 - Re-implement the following using for loops:
*# Display a text() message that indicates the winner
+
** Linear search
*# Call the noLoop() method to stop the game when there is a winner
+
** Binary search
*# Implement a mechanism/conditional to check if the game is a draw (tie)
+
** Selection sort
* Demo a completed Tic-Tac-Toe game
+
** Bubble sort
* Challenge:
+
** Insertion sort
*# Implement an AI to play against you
+
* for loop assignments (repl.it submissions coming...)
*# Design and implement [https://en.wikipedia.org/wiki/Ultimate_tic-tac-toe Ultimate/Super Tic-Tac-Toe]
+
*# Write a program that takes a String input, uses a for loop, counts and displays the total number of spaces
 +
*# Write a program that takes a double[], uses a for loop, and displays the average value of all elements in the array
 +
*# Write a program that takes a String input, and displays the entire string reversed (on one line)
 +
* Have a great Thanksgiving Break!
 +
 
 +
== Thursday (11/15/18) ==
 +
'''Warmup:'''
 +
* Login to your [https://www.albert.io albert.io] account
 +
* Join our AP CS A course using: EMVT7IN8APTL
  
== Tuesday (10/16/18) ==
 
 
'''Agenda:'''
 
'''Agenda:'''
* Read [https://www.processing.org/reference/text_.html text()] and test it out to draw some text on the screen
+
* Java for loops (eIMACS: For Loops)
* Read [https://www.processing.org/reference/mouseReleased_.html mouseReleased()] and test out the code
+
*# Write a for loop that prints out 0 to 10 (exclusive)
* X-O clicker assignment
+
*# Write a for loop that prints out 100 to 50 (inclusive)
*# Modify the code of the mouseReleased() so that a text-based X or O is drawn every time the mouse button is released
+
*# Write a for loop that prints out the first 10 odd numbers
* Work on and complete Tic-Tac-Toe - Part 2
+
* for Loop Practice 1 - Convert the following programs from a while loop to a for loop (due '''Monday (11/19/18)''')
*# Add a String variable to track the turn ("X" or "O")
+
*# Monte Carlo Pi
*# Add a two-dimensional String array to your Tic-Tac-Toe at the top to track the moves (all elements start as "", but will be "X" or "O" later)
+
*# Taylor Series Pi and e
*# Implement the appropriate code in mouseReleased() to draw Xs and Os where the mouse button is released
+
*# Looping exercises
*# Make sure that you also have conditionals to check whether or not the location that is clicked is still empty (check against 2D array)
 
*# Make sure you update the 2-D String array with the current player's move
 
*# Update the turn variable so that it switches (only with a successful move)
 
* Done with the above? Here are some challenges:
 
*# Implement a winner checking feature to stop the game and display who won
 
*# Implement an AI to play against you
 
*# Design and implement [https://en.wikipedia.org/wiki/Ultimate_tic-tac-toe Ultimate/Super Tic-Tac-Toe]
 
  
== Friday (10/12/18) ==
+
== Tuesday (11/13/18) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Activity 5 Questions?
+
* Bubble sort questions?
* Test 5 Questions?
+
** Bubble sort should be done by now
* mouseReleased()
+
* NetBeans installation check
* Tic-Tac-Toe w/ Arrays
+
* JGrasp installation check
*# Create a new Processing sketch
+
* JGrasp canvas visualization practice
*# Copy over your TTT: Select-a-Square code
+
** Simple variables
*# Add a two-dimensional String array to your Tic-Tac-Toe at the top
+
** Array
*# Implement the appropriate code in mouseReleased() to draw Xs and Os (do as much as you can)
+
** Loop
 +
* Insertion Sort Assignment
 +
*# Study the insertion sort visualization [https://visualgo.net/bn/sorting VisuAlgo]
 +
*# What are the major components of the algorithm? (e.g. Loop that iterates through array from beginning to end)  Others?
 +
*# Implement insertion sort
 +
*# Create your own data set and demonstrate your code for credit.  Be prepared to be able to explain how your code works
 +
*# Submit you code via Repl.it
  
== Tuesday (10/9/18) ==
+
== Wednesday (11/8/18) ==
 
'''Agenda:'''
 
'''Agenda:'''
* [https://drive.google.com/open?id=1L-tbBp51YuUoTWldXFBr6JGcyHF5sBy_flfPGiqlVAQ Java methods overview]
+
* Selection sort assignment in repl.it should be already complete
* Complete and demo Tic-Tac-Toe Select-a-Square
+
* Watch the bubble sort visualization at [https://visualgo.net/bn/sorting VisuAlgo]
* Skim over eIMACS: Arrays chapter
+
** Watch it multiple times until you have a firm understanding of what is happening
* Mr. Bui's [https://drive.google.com/open?id=1Ayzvd1q-6RwZKplUtLHDCCLyO5XIR5kyeKUi8-htErY Arrays (Java) slides]  
+
** You can also read slide 5 about bubble sort in the [https://docs.google.com/presentation/d/1Y5JOINM2w744nqimZf2iVuFpi6N6gM2B7GM4ArGjChQ/edit?usp=sharing Sorting slides]
* Complete Activity 5
+
* There is a bubble sort repl.it assignment posted with guided comments. Implement bubble sort using the guided comments. You can copy-paste the comments into NetBeans to develop your code. Be sure to submit your finalized code into repl.it for bubble sort
* Complete Test 5
+
* Future assignments will implement insertion sort and merge sort algorithms. You are encouraged to watch the [https://visualgo.net/bn/sorting VisuAlgo] visualizations to understand those algorithms
 +
 
 +
== Monday (11/5/18) ==
 +
'''Warmup:'''
 +
# Assume you have a given int[] named arr
 +
# Assume you have two int variables named a and b
 +
# Write the code that would swap the elements in arr located at indices a and b
 +
#* e.g. swap the elements arr[a] and arr[b]
  
== Thursday (10/4/18) ==
 
 
'''Agenda:'''
 
'''Agenda:'''
* Take the Strings + Conditionals Quiz in Canvas
+
* Complete the Find Minimum & Maximum repl.it
* Demo your first Processing drawing (it should also have your initials in the bottom right-hand corner)
+
* Group sorting activity
* Introduction to Methods
+
*# Form 3-4 person groups
** Intro to Processing methods
+
*# Receive playing cards
** Method calls
+
*# With your group, document step-by-step an algorithm (steps) of how you sort the cards out
** Method parameters & arguments
+
*# Every group will share their algorithm in class
*** Parameters are the variables in the method's definition header
+
*# Paste your sorting algorithm in this [https://docs.google.com/document/d/1Jh9Uz3FdomH2cB9VKUSTfL_BSluWEoROHmhwbpM_qaA/edit?usp=sharing group document] - Don't forget to put your names
*** Arguments are the values used in the method call
+
* Introduction to Sorting
* Tic-Tac-Toe Select-a-Square
+
** [https://docs.google.com/presentation/d/1Y5JOINM2w744nqimZf2iVuFpi6N6gM2B7GM4ArGjChQ/edit?usp=sharing Sorting slides]
*# Setup your screen size to be a large square (e.g. 600x600)
+
* Complete Selection sort assignment in repl.it
*# Within the draw() function, give the background a color()
 
*# Draw tic-tac-toe lines on your screen (make sure that the rows and columns are exactly 1/3 the size of the height and width)
 
*# Add conditional statements in the draw() function to detect which square you are in
 
*#* You'll need to access the mouse's current coordinates with '''mouseX''' and '''mouseY''' variables
 
*#* Draw a square of a different color inside the particular square that you are in
 
*#* The effect that you will generate will look like it is highlighting the current square where the mouse is
 
*# Challenge: Modify your code so that changing the screen size, will automatically be adjusted and accounted for by the rest of your code. Hint: use '''height''' and '''width''' variables
 
*# Challenge2: Modify your code so that it works without any conditionals. Hint: Use division and multiplication
 
  
== Tuesday (10/2/18) ==
+
== Thursday (11/1/18) ==
'''Agenda:'''
+
* While loops quiz
* Questions on Activity 6: Airline meals?
+
* [https://docs.google.com/presentation/d/1GLpwZbqLcyix2WHqS9lLJT3qCeIeWGQ9UDwr6f9VgoE/edit?usp=sharing Search slides]
* [https://processing.org/ Processing]
+
** Linear Search
*# Download Processing
+
** Binary Search
*# Drag-n-drop the program where you want to keep it
+
* LS and BS assignments will be posted in Repl.it
*# Check out the [https://www.processing.org/reference/ Processing documentation]
+
* Complete LS and BS by Monday (11/5/18)
* My First Processing Drawing
 
*# Draw your initials in the bottom right-hand corner
 
*# Use Processing and method calls to draw your favorite emoji, logo, cartoon character, etc.
 
  
 
== Archives ==
 
== Archives ==
 +
* [[APCS - 1819 - October]]
 
* [[APCS - 1819 - September]]
 
* [[APCS - 1819 - September]]
 
* [[APCS - 1718]]
 
* [[APCS - 1718]]
 
* [[APCS - 1516]]
 
* [[APCS - 1516]]

Revision as of 10:34, 10 December 2018

Monday (12/10/19)

Agenda:

  • Complete Lab 1: Chatter

Homework:

  • Complete Lab 1: Chatter

Thursday (12/6/18)

Agenda:

  • Go over eIMACS: Test 10 homework
  • main method
  • Comments
  • Multiple variable declarations (comma-separated)
  • Complete Lab 1: Chatter (you will need NetBeans or Eclipse)

Tuesday (12/4/18)

Warmup:

  • Complete #1 of eIMACS: Activity 7: Checksums

Agenda:

  • Make sure you have completed all repl.it methods assignments
  • Complete eIMACS: Activity 11: Strings 2
    • Use the AP CS exam quick reference card
    • All methods should be able to be completed using the methods listed in the card

Homework:

  • Complete eIMACS: Activity 7 #2
  • Complete eIMACS: Test 10

Friday (11/30/18)

Agenda:

  • Search & Sort Identification Quiz
  • for loop demos - Practice 1 & 2
  • Complete for Loop assignments in Repl.it
    • Count Words
    • double[] Average
    • Reverse String Print
  • Introduction to Methods

Monday - Wednesday (11/26/18 - 11/28/18)

Warmup:

  • Write a program that takes a String input, uses a for loop, and prints every other letter in the string

Agenda:

  • for loop demos - Practice 1:
    1. Monte Carlo Pi
    2. Taylor Series Pi and e
    3. Looping exercises
  • for loop demos - Practice 2:
    1. Linear search
    2. Binary search
    3. Selection sort
    4. Bubble sort
    5. Insertion sort
  • Complete for Loop assignments in Repl.it
    • Count Words
    • double[] Average
    • Reverse String Print
  • Search & Sort Identification Quiz next class
    • If shown the programming code or visualization of a particular algorithm, you can identify its name
    • You may be shown code or visualizations of things that you have not yet learned! You must be able to say that you did not learn it yet

Monday (11/19/18)

Warmup:

  • for loops quiz at the end of class
  • Prepare to demo for looped version of:
    1. Monte Carlo Pi
    2. Taylor Series Pi and e
    3. Looping exercises

Agenda:

  • Repl.it resubmits
    • Binary search incorrect -- please redo and resubmit
  • for Loop Practice 2 - Re-implement the following using for loops:
    • Linear search
    • Binary search
    • Selection sort
    • Bubble sort
    • Insertion sort
  • for loop assignments (repl.it submissions coming...)
    1. Write a program that takes a String input, uses a for loop, counts and displays the total number of spaces
    2. Write a program that takes a double[], uses a for loop, and displays the average value of all elements in the array
    3. Write a program that takes a String input, and displays the entire string reversed (on one line)
  • Have a great Thanksgiving Break!

Thursday (11/15/18)

Warmup:

  • Login to your albert.io account
  • Join our AP CS A course using: EMVT7IN8APTL

Agenda:

  • Java for loops (eIMACS: For Loops)
    1. Write a for loop that prints out 0 to 10 (exclusive)
    2. Write a for loop that prints out 100 to 50 (inclusive)
    3. Write a for loop that prints out the first 10 odd numbers
  • for Loop Practice 1 - Convert the following programs from a while loop to a for loop (due Monday (11/19/18))
    1. Monte Carlo Pi
    2. Taylor Series Pi and e
    3. Looping exercises

Tuesday (11/13/18)

Agenda:

  • Bubble sort questions?
    • Bubble sort should be done by now
  • NetBeans installation check
  • JGrasp installation check
  • JGrasp canvas visualization practice
    • Simple variables
    • Array
    • Loop
  • Insertion Sort Assignment
    1. Study the insertion sort visualization VisuAlgo
    2. What are the major components of the algorithm? (e.g. Loop that iterates through array from beginning to end) Others?
    3. Implement insertion sort
    4. Create your own data set and demonstrate your code for credit. Be prepared to be able to explain how your code works
    5. Submit you code via Repl.it

Wednesday (11/8/18)

Agenda:

  • Selection sort assignment in repl.it should be already complete
  • Watch the bubble sort visualization at VisuAlgo
    • Watch it multiple times until you have a firm understanding of what is happening
    • You can also read slide 5 about bubble sort in the Sorting slides
  • There is a bubble sort repl.it assignment posted with guided comments. Implement bubble sort using the guided comments. You can copy-paste the comments into NetBeans to develop your code. Be sure to submit your finalized code into repl.it for bubble sort
  • Future assignments will implement insertion sort and merge sort algorithms. You are encouraged to watch the VisuAlgo visualizations to understand those algorithms

Monday (11/5/18)

Warmup:

  1. Assume you have a given int[] named arr
  2. Assume you have two int variables named a and b
  3. Write the code that would swap the elements in arr located at indices a and b
    • e.g. swap the elements arr[a] and arr[b]

Agenda:

  • Complete the Find Minimum & Maximum repl.it
  • Group sorting activity
    1. Form 3-4 person groups
    2. Receive playing cards
    3. With your group, document step-by-step an algorithm (steps) of how you sort the cards out
    4. Every group will share their algorithm in class
    5. Paste your sorting algorithm in this group document - Don't forget to put your names
  • Introduction to Sorting
  • Complete Selection sort assignment in repl.it

Thursday (11/1/18)

  • While loops quiz
  • Search slides
    • Linear Search
    • Binary Search
  • LS and BS assignments will be posted in Repl.it
  • Complete LS and BS by Monday (11/5/18)

Archives