Difference between revisions of "AP Computer Science"

From WLCS
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
== Thursday (10/17/19) ==
 +
'''Agenda:'''
 +
* Did you complete Activity 6?
 +
* Iteration - While Loops
 +
** Basic while loops
 +
**# Write a loop that prints 0 to 10 (exclusive)
 +
**# Write a loop that prints 10 to 0 (inclusive)
 +
**# Write a loop that sums all the numbers from 0 to 1000 (inclusive)
 +
**# Write a loop that prints all the numbers that are divisible by 3 and 7 between 0 and 1000
 +
** While loops with strings
 +
**# Write a loop that prints each character of a String s (you supply the String's value)
 +
**# Write a loop that prints every other character of a String s
 +
**# Write a loop that prints each character of a String s from end to beginning
 +
**# Write a loop that counts the number of occurrences of a particular substring within a larger string (there are many ways to do this)
 +
**# Write a loop that prints the location of every occurrence of a particular substring within a larger string (there are many ways to do this!)
 +
** While loops with arrays
 +
**# Write a loop that prints every element of an int[]
 +
**# Write a loop that prints the square of every element in an int[]
 +
**# Write a loop that sums all the numbers of an int[]
 +
** Complete Test 6 and Test 7
 +
 +
'''Homework:'''
 +
* Complete Test 6 and Test 7 if you did not do so in class
 +
 +
== Friday (10/11/19) ==
 +
'''Agenda:'''
 +
* Activity 5 Questions?
 +
* Test 5 Questions?
 +
* Arrays Quiz
 +
* Complete Activity 6
 +
 +
'''Homework:'''
 +
* Complete Activity 6: Airline Meals
 +
 +
== Wednesday (10/9/19) ==
 +
'''Agenda:'''
 +
* Demo completed Tic-Tac-Toe game
 +
* Introduction to Arrays
 +
** Walk-through and read eIMACS: Arrays chapter (page 60)
 +
** [https://docs.google.com/a/apsva.us/presentation/d/1Ayzvd1q-6RwZKplUtLHDCCLyO5XIR5kyeKUi8-htErY/edit?usp=sharing Java Arrays]
 +
** Complete the Canvas Arrays Practice assignment
 +
** Complete Activity 5: Arrays
 +
** Java Arrays Quiz on '''Friday (10/11/19)'''
 +
 +
'''Homework:'''
 +
* Complete Test 5
 +
 +
== Monday (10/7/19) ==
 +
'''Agenda:'''
 +
* Demo Tic-Tac-Toe - Part 2
 +
* Tic-Tac-Toe - Part 3
 +
*# Be sure to create a new sketch so as not to lose your working Part 2 code
 +
*# 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)
 +
*# Display a text() message that indicates the winner
 +
*# Call the noLoop() method to stop the game when there is a winner
 +
*# Implement a mechanism/conditional to check if the game is a draw (tie)
 +
* Demo a completed Tic-Tac-Toe game
 +
* Challenge:
 +
*# Implement an AI to play against you
 +
*# Design and implement [https://en.wikipedia.org/wiki/Ultimate_tic-tac-toe Ultimate/Super Tic-Tac-Toe]
 +
 
== Thursday (10/3/19) ==
 
== Thursday (10/3/19) ==
 
'''Agenda:'''
 
'''Agenda:'''
Line 38: Line 99:
 
*# Design and implement [https://en.wikipedia.org/wiki/Ultimate_tic-tac-toe Ultimate/Super Tic-Tac-Toe]
 
*# Design and implement [https://en.wikipedia.org/wiki/Ultimate_tic-tac-toe Ultimate/Super Tic-Tac-Toe]
  
== Friday (9/27/19) ==
+
== [[APCS - 1920 - September]] ==
'''Agenda:'''
 
* Processing Review
 
** [https://processing.org/reference/ Processing Reference]
 
** Introduction to animation
 
* Tic-Tac-Toe Select-a-Square
 
*# Setup your screen size to be a large square (e.g. 600x600)
 
*# 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
 
*# Challenge 2: Modify your code so that it works without any conditionals. Hint: Use division and multiplication
 
*# Challenge 3: Use loops to create a M x N grid (that still allows the hover selection)
 
 
 
== [https://docs.google.com/presentation/d/1PoA335gHnDCoWpGEpgHLDDaVzxjZ7fdE-oDaQaiENaQ/edit?usp=sharing Back to School Night] ==
 
 
 
== Wednesday (9/24/19) ==
 
'''Warmup:'''
 
* Surprise again.
 
 
 
'''Agenda:'''
 
* Surprise again questions?
 
* Activity 4 & Test 4 questions?
 
* Truth table practice
 
* Conditional Statements (if-statements)
 
* Blocks
 
* Complete the 3 Conditional Statement Practice assignments in Repl.it
 
* [https://processing.org/ Processing]
 
*# Download Processing
 
*# Drag-n-drop the program where you want to keep it
 
*# Complete [https://docs.google.com/document/d/1xdng3dwTJzEE1ZB2GWVn7zFMhkqXHAp7FQ0EDl7b4RM/edit?usp=sharing Introduction: My First Sketch]
 
*#* Submit a screenshot of your final product to Canvas
 
*# Check out the [https://www.processing.org/reference/ Processing documentation]
 
 
 
'''Homework:'''
 
* Complete the 3 Conditional Statement Practice assignments in Repl.it
 
* Complete [https://docs.google.com/document/d/1xdng3dwTJzEE1ZB2GWVn7zFMhkqXHAp7FQ0EDl7b4RM/edit?usp=sharing Introduction: My First Sketch]
 
 
 
== Monday (9/23/19) ==
 
'''Warmup:'''
 
* Check that you completed AP Classroom Progress Check Multiple-choice
 
* Check that you completed Exercises 30 & 31 in Canvas
 
 
 
'''Agenda:'''
 
* AP Classroom Progress Check MC debrief
 
* Comparing Strings walk-through
 
** equals()
 
** compareTo()
 
* Logical Operators walk-through
 
** Complete the Exercises 34, 35 & 37 in Canvas
 
* Complete Activity 4: Booleans
 
* Complete Test 4
 
 
 
'''Homework:'''
 
* Complete Activity 4: Booleans if you did not do so in class
 
* Complete Test 4 if you did not do so in class
 
 
 
== Thursday (9/19/19) ==
 
'''Warmup:'''
 
* Login to https://myap.collegeboard.org
 
* Join our class using the the join code: ADPJ67
 
 
 
'''Agenda:'''
 
* [https://drive.google.com/open?id=1f2HPJOP7xxWGgEyl_gXXzn5aMiAT6qwHdvS2he6E5wg Binary crash course]
 
* Integer.MIN_VALUE and Integer.MAX_VALUE
 
** Overflow errors
 
* Review the [https://drive.google.com/open?id=1cLw6xv8Sdr-RpbqpPHrRBhIKgUufJ9uv Unit 1 Guide]
 
** Please pay special attention to the "Essential Knowledge" skills and notes
 
* Complete the AP Classroom - Unit 1 Progress Check: MCQ Part A
 
* Read Booleans chapter
 
* Read through Relational Operators
 
** Complete the Exercises 30 & 31 in Canvas
 
 
 
'''Homework:'''
 
* Complete AP Classroom Progress Check Multiple-choice
 
* Complete the Exercises 30 & 31 in Canvas
 
 
 
== Tuesday (9/17/19) ==
 
'''Warmup:'''
 
* Surprise.
 
 
 
'''Agenda:'''
 
* Activity 3 questions?
 
* Test 3 questions?
 
* Keyboard input with Scanner
 
* Complete the Rectangle Area Calculator repl.it
 
* Complete the E-mail Harvester repl.it
 
 
 
'''Homework:'''
 
* Complete the E-mail Harvester if you did not do so in class
 
 
 
== Friday (9/13/19) ==
 
'''Warmup:'''
 
* Complete today's warmup in Canvas
 
** You may re-attempt to achieve a higher score
 
 
 
'''Agenda:'''
 
* Variable types, declarations & casting quiz
 
* App catalog --> Install NetBeans, Java, etc.
 
* Download [https://processing.org/download/ Processing]
 
* Strings
 
** Creating Strings
 
** indexing starts at 0
 
** immutable ~ unchangeable
 
** Escape sequence characters
 
** Concatenation
 
*** Try concatenating String, int, and double
 
** String Methods (functions)
 
*** length(), substring(), indexOf()
 
*** [https://docs.oracle.com/javase/8/docs/api/java/lang/String.html String Javadoc]
 
** Displaying Messages
 
** Converting Between Numbers and Strings
 
* Complete Activity 3: Strings 1
 
 
 
'''Homework:
 
* Complete Activity 3: Strings 1 if you did not do so in class
 
* Complete Test 3
 
 
 
== Wednesday (9/11/19) ==
 
'''Warmup:'''
 
* Complete Test 2 if you have not already done so!
 
* If you have already finished Test 2, then review what you got wrong and be prepared to ask questions
 
 
 
'''Agenda:'''
 
* Variable types, declarations, and casting quiz on '''Friday (9/13/19)'''
 
* Test 2 review
 
* Experienced programming challenges:
 
** [http://projecteuler.net Project Euler]
 
** [http://rosalind.info/problems/locations/ Project Rosalind]
 
** [http://www.reddit.com/r/dailyprogrammer Reddit: DailyProgrammer]
 
* Programming shortcuts review
 
* Activity 1: Rounding examples
 
* Complete Activity 2: Circles and Spheres
 
* Strings
 
** Special escape characters
 
 
 
'''Homework:'''
 
* Study for the Variable types, declarations, and casting quiz
 
 
 
== Monday (9/9/19) ==
 
'''Warmup:'''
 
* Complete the [https://docs.google.com/forms/d/e/1FAIpQLScgzEnJq1K9GyFb2rqkOGp3yb0c1PC04lnGolz7Wu8PVy25Jg/viewform AP CS Textbook Enrollment form]
 
* Make sure you have joined our [https://repl.it/classroom/invite/d4J5O1x repl.it class]
 
* Confirm that you have fixed your last name to match the convention: # - Last name
 
 
 
'''Agenda:'''
 
* Complete syllabus agreement assignment in Canvas by the end of today
 
* Receive/register for [https://www.eimacs.com/ eIMACS] textbook
 
* Variable types, declarations, assignment
 
** int
 
** double
 
* Casting
 
* Variable types, declarations, and casting pitfalls
 
* Complete Test 1
 
* Math operators & Arithmetic Expressions
 
* Pitfalls and Surprises
 
** e.g. integer division
 
* Programming shortcuts
 
 
 
 
 
'''Homework:'''
 
* Complete Test 2
 
 
 
== Thursday (9/5/19) ==
 
'''Warmup:'''
 
* Complete the Student Survey in Canvas
 
* Complete the Search & Sorting Algorithms Pre-assessment in Canvas
 
** Do not guess if you do not know the answer
 
 
 
'''Agenda:'''
 
* Attendance
 
* Misc logistics
 
** 20/10 no pass policy
 
** Location of bathrooms
 
** Sign in/out sheets
 
** Mr. Bui has C Lunch
 
* [[AP Computer Science Syllabus]]
 
** Complete syllabus agreement assignment in Canvas by Monday (9/9/19)
 
* Introductions w/ Pictures
 
*# You will be given a group Google presentation
 
*#* [https://docs.google.com/presentation/d/1nICljF-rZJ42arbgK0gUXW375Vw19dHI7W13SOh0doo/edit?usp=sharing Period 2]
 
*# Create a new slide
 
*# Use your first and last name as your title
 
*# Paste 4 or more images that describe who you are
 
 
 
'''Homework:'''
 
* Complete syllabus agreement assignment in Canvas by Monday (9/9/19)
 
 
 
== Tuesday (9/3/19) ==
 
'''Agenda:'''
 
* Introductions & attendance
 
** [https://docs.google.com/presentation/d/1Nzo-2anihJvunXw6plSr3pdw9mS26Mv0CZLT-inhGoc/edit?usp=sharing About Me]
 
* Create/login to [https://repl.it/ Repl.it] using your APS Google account
 
** Update your last name so that it follows the following naming convention: # - Last Name (please note the spacing)
 
** Join our [https://repl.it/classroom/invite/d4J5O1x repl.it class]
 
** Complete the Hello, world! assignment
 
* [[AP Computer Science Syllabus]]
 
* Complete syllabus agreement assignment in Canvas by Monday (9/9/19)
 
  
 
== [[APCS - Archives]] ==
 
== [[APCS - Archives]] ==

Revision as of 08:19, 17 October 2019

Thursday (10/17/19)

Agenda:

  • Did you complete Activity 6?
  • Iteration - While Loops
    • Basic while loops
      1. Write a loop that prints 0 to 10 (exclusive)
      2. Write a loop that prints 10 to 0 (inclusive)
      3. Write a loop that sums all the numbers from 0 to 1000 (inclusive)
      4. Write a loop that prints all the numbers that are divisible by 3 and 7 between 0 and 1000
    • While loops with strings
      1. Write a loop that prints each character of a String s (you supply the String's value)
      2. Write a loop that prints every other character of a String s
      3. Write a loop that prints each character of a String s from end to beginning
      4. Write a loop that counts the number of occurrences of a particular substring within a larger string (there are many ways to do this)
      5. Write a loop that prints the location of every occurrence of a particular substring within a larger string (there are many ways to do this!)
    • While loops with arrays
      1. Write a loop that prints every element of an int[]
      2. Write a loop that prints the square of every element in an int[]
      3. Write a loop that sums all the numbers of an int[]
    • Complete Test 6 and Test 7

Homework:

  • Complete Test 6 and Test 7 if you did not do so in class

Friday (10/11/19)

Agenda:

  • Activity 5 Questions?
  • Test 5 Questions?
  • Arrays Quiz
  • Complete Activity 6

Homework:

  • Complete Activity 6: Airline Meals

Wednesday (10/9/19)

Agenda:

  • Demo completed Tic-Tac-Toe game
  • Introduction to Arrays
    • Walk-through and read eIMACS: Arrays chapter (page 60)
    • Java Arrays
    • Complete the Canvas Arrays Practice assignment
    • Complete Activity 5: Arrays
    • Java Arrays Quiz on Friday (10/11/19)

Homework:

  • Complete Test 5

Monday (10/7/19)

Agenda:

  • Demo Tic-Tac-Toe - Part 2
  • Tic-Tac-Toe - Part 3
    1. Be sure to create a new sketch so as not to lose your working Part 2 code
    2. 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)
    3. Display a text() message that indicates the winner
    4. Call the noLoop() method to stop the game when there is a winner
    5. Implement a mechanism/conditional to check if the game is a draw (tie)
  • Demo a completed Tic-Tac-Toe game
  • Challenge:
    1. Implement an AI to play against you
    2. Design and implement Ultimate/Super Tic-Tac-Toe

Thursday (10/3/19)

Agenda:

  • Work on and complete Tic-Tac-Toe - Part 2
    1. Add a String variable to track the turn ("X" or "O")
    2. You have two options:
      • 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)
      • Add 9 String variables, one for each Tic-Tac-Toe square. Use a naming convention like (b_0_0, b_0_1, etc.)
    3. Implement the appropriate code in mouseReleased() and draw() to draw Xs and Os where the mouse button is released
    4. Make sure that you also have conditionals to check whether or not the location that is clicked is still empty (check against 2D array)
    5. Make sure you update the 2-D String array OR your b_#_# variables with the current player's move
    6. Update the turn variable so that it switches after a player has successfully made a move
    7. Don't forget to update your draw() with text() commands so that all the moves are displayed
  • Done with the above? Here are some challenges:
    1. Implement a winner checking feature to stop the game and display who won
    2. Implement an AI to play against you
    3. Design and implement Ultimate/Super Tic-Tac-Toe

Tuesday (10/1/19)

Agenda:

  • Demo Tic-Tac-Toe: Select-a-Square
  • Read text() and test it out to draw some text on the screen
  • Read mouseReleased() and test out the code
  • X-O clicker assignment
    1. Modify the code of the mouseReleased() so that a text-based X or O is drawn every time the mouse button is released
  • Work on and complete Tic-Tac-Toe - Part 2
    1. Add a String variable to track the turn ("X" or "O")
    2. You have two options:
      • 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)
      • Add 9 String variables, one for each Tic-Tac-Toe square. Use a naming convention like (b_0_0, b_0_1, etc.)
    3. Implement the appropriate code in mouseReleased() and draw() to draw Xs and Os where the mouse button is released
    4. Make sure that you also have conditionals to check whether or not the location that is clicked is still empty (check against 2D array)
    5. Make sure you update the 2-D String array OR your b_#_# variables with the current player's move
    6. Update the turn variable so that it switches after a player has successfully made a move
    7. Don't forget to update your draw() with text() commands so that all the moves are displayed
  • Done with the above? Here are some challenges:
    1. Implement a winner checking feature to stop the game and display who won
    2. Implement an AI to play against you
    3. Design and implement Ultimate/Super Tic-Tac-Toe

APCS - 1920 - September

APCS - Archives