Difference between revisions of "AP Computer Science"

From WLCS
(32 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Thursday (9/19/19) ==
+
== Thursday (10/17/19) ==
'''Warmup:'''
 
* Login to http://collegeboard.org/joinapclass
 
* Join our class using the the join code: ADPJ67
 
 
 
 
'''Agenda:'''
 
'''Agenda:'''
* Integer.MIN_VALUE and Integer.MAX_VALUE
+
* Did you complete Activity 6?
** Overflow errors
+
* Iteration - While Loops
* Review the Unit 1 Guide
+
** Basic while loops
* Complete the AP Classroom - Unit 1 Progress Check: MCQ Part A
+
**# Write a loop that prints 0 to 10 (exclusive)
* Booleans walk-through
+
**# Write a loop that prints 10 to 0 (inclusive)
* Relational Operators walk-through
+
**# Write a loop that sums all the numbers from 0 to 1000 (inclusive)
** Complete the Exercises 30 & 31 in Canvas
+
**# Write a loop that prints all the numbers that are divisible by 3 and 7 between 0 and 1000
* Comparing Strings walk-through
+
** While loops with strings
* Logical Operators walk-through
+
**# Write a loop that prints each character of a String s (you supply the String's value)
** Complete the Exercises 34, 35 & 37 in Canvas
+
**# Write a loop that prints every other character of a String s
* Complete Activity 4: Booleans
+
**# Write a loop that prints each character of a String s from end to beginning
* Complete Test 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)
 +
**# 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
  
== Tuesday (9/17/19) ==
+
'''Homework:'''
'''Warmup:'''
+
* Complete Test 6 and Test 7 if you did not do so in class
* Surprise.
 
  
 +
== Friday (10/11/19) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Activity 3 questions?
+
* Activity 5 Questions?
* Test 3 questions?
+
* Test 5 Questions?
* Keyboard input with Scanner
+
* Arrays Quiz
* Complete the Rectangle Area Calculator repl.it
+
* Complete Activity 6
* Complete the E-mail Harvester repl.it
 
  
 
'''Homework:'''
 
'''Homework:'''
* Complete the E-mail Harvester if you did not do so in class
+
* Complete Activity 6: Airline Meals
 
 
== Friday (9/13/19) ==
 
'''Warmup:'''
 
* Complete today's warmup in Canvas
 
** You may re-attempt to achieve a higher score
 
  
 +
== Wednesday (10/9/19) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Variable types, declarations & casting quiz
+
* Demo completed Tic-Tac-Toe game
* App catalog --> Install NetBeans, Java, etc.
+
* Introduction to Arrays
* Download [https://processing.org/download/ Processing]
+
** Walk-through and read eIMACS: Arrays chapter (page 60)
* Strings
+
** [https://docs.google.com/a/apsva.us/presentation/d/1Ayzvd1q-6RwZKplUtLHDCCLyO5XIR5kyeKUi8-htErY/edit?usp=sharing Java Arrays]
** Creating Strings
+
** Complete the Canvas Arrays Practice assignment
** indexing starts at 0
+
** Complete Activity 5: Arrays
** immutable ~ unchangeable
+
** Java Arrays Quiz on '''Friday (10/11/19)'''
** 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:
+
'''Homework:'''
* Complete Activity 3: Strings 1 if you did not do so in class
+
* Complete Test 5
* 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
 
  
 +
== Monday (10/7/19) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Variable types, declarations, and casting quiz on '''Friday (9/13/19)'''
+
* Demo Tic-Tac-Toe - Part 2
* Test 2 review
+
* Tic-Tac-Toe - Part 3
* Experienced programming challenges:
+
*# Be sure to create a new sketch so as not to lose your working Part 2 code
** [http://projecteuler.net Project Euler]
+
*# 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)
** [http://rosalind.info/problems/locations/ Project Rosalind]
+
*# Display a text() message that indicates the winner
** [http://www.reddit.com/r/dailyprogrammer Reddit: DailyProgrammer]
+
*# Call the noLoop() method to stop the game when there is a winner
* Programming shortcuts review
+
*# Implement a mechanism/conditional to check if the game is a draw (tie)
* Activity 1: Rounding examples
+
* Demo a completed Tic-Tac-Toe game
* Complete Activity 2: Circles and Spheres
+
* Challenge:
* Strings
+
*# Implement an AI to play against you
** Special escape characters
+
*# Design and implement [https://en.wikipedia.org/wiki/Ultimate_tic-tac-toe Ultimate/Super Tic-Tac-Toe]
 
 
'''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
 
  
 +
== Thursday (10/3/19) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Complete syllabus agreement assignment in Canvas by the end of today
+
* Work on and complete Tic-Tac-Toe - Part 2
* Receive/register for [https://www.eimacs.com/ eIMACS] textbook
+
*# Add a String variable to track the turn ("X" or "O")
* Variable types, declarations, assignment
+
*# You have two options:
** int
+
*#* 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)
** double
+
*#* Add 9 String variables, one for each Tic-Tac-Toe square. Use a naming convention like (b_0_0, b_0_1, etc.)
* Casting
+
*# Implement the appropriate code in mouseReleased() and draw() to draw Xs and Os where the mouse button is released
* Variable types, declarations, and casting pitfalls
+
*# Make sure that you also have conditionals to check whether or not the location that is clicked is still empty (check against 2D array)
* Complete Test 1
+
*# Make sure you update the 2-D String array OR your b_#_# variables with the current player's move
* Math operators & Arithmetic Expressions
+
*# Update the turn variable so that it switches after a player has successfully made a move
* Pitfalls and Surprises
+
*# Don't forget to update your draw() with text() commands so that all the moves are displayed
** e.g. integer division
+
* Done with the above? Here are some challenges:
* Programming shortcuts
+
*# 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]
'''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
 
  
 +
== Tuesday (10/1/19) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Attendance
+
* Demo Tic-Tac-Toe: Select-a-Square
* Misc logistics
+
* Read [https://www.processing.org/reference/text_.html text()] and test it out to draw some text on the screen
** 20/10 no pass policy
+
* Read [https://www.processing.org/reference/mouseReleased_.html mouseReleased()] and test out the code
** Location of bathrooms
+
* X-O clicker assignment
** Sign in/out sheets
+
*# Modify the code of the mouseReleased() so that a text-based X or O is drawn every time the mouse button is released
** Mr. Bui has C Lunch
+
* Work on and complete Tic-Tac-Toe - Part 2
* [[AP Computer Science Syllabus]]
+
*# Add a String variable to track the turn ("X" or "O")
** Complete syllabus agreement assignment in Canvas by Monday (9/9/19)
+
*# You have two options:
* Introductions w/ Pictures
+
*#* 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)
*# You will be given a group Google presentation
+
*#* Add 9 String variables, one for each Tic-Tac-Toe square. Use a naming convention like (b_0_0, b_0_1, etc.)
*#* [https://docs.google.com/presentation/d/1nICljF-rZJ42arbgK0gUXW375Vw19dHI7W13SOh0doo/edit?usp=sharing Period 2]
+
*# Implement the appropriate code in mouseReleased() and draw() to draw Xs and Os where the mouse button is released
*# Create a new slide
+
*# Make sure that you also have conditionals to check whether or not the location that is clicked is still empty (check against 2D array)
*# Use your first and last name as your title
+
*# Make sure you update the 2-D String array OR your b_#_# variables with the current player's move
*# Paste 4 or more images that describe who you are
+
*# Update the turn variable so that it switches after a player has successfully made a move
 +
*# 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:
 +
*# 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]
  
'''Homework:'''
+
== [[APCS - 1920 - September]] ==
* 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