Difference between revisions of "AP Computer Science"

From WLCS
(Tuesday (10/1/19))
Line 9: Line 9:
 
*# Add a String variable to track the turn ("X" or "O")
 
*# Add a String variable to track the turn ("X" or "O")
 
*# 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 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)
*# Implement the appropriate code in mouseReleased() to draw Xs and Os where the mouse button is released
+
*# Implement the appropriate code in mouseReleased() and draw() to draw Xs and Os where the mouse button is released
 
*# 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 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
 
*# Make sure you update the 2-D String array with the current player's move

Revision as of 09:15, 1 October 2019

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. 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)
    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 with the current player's move
    6. Update the turn variable so that it switches after a player has successfully made a move
  • 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

Friday (9/27/19)

Agenda:

  • Processing Review
  • Tic-Tac-Toe Select-a-Square
    1. Setup your screen size to be a large square (e.g. 600x600)
    2. Within the draw() function, give the background a color()
    3. 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)
    4. 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
    5. 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
    6. Challenge 2: Modify your code so that it works without any conditionals. Hint: Use division and multiplication
    7. Challenge 3: Use loops to create a M x N grid (that still allows the hover selection)

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
  • Processing
    1. Download Processing
    2. Drag-n-drop the program where you want to keep it
    3. Complete Introduction: My First Sketch
      • Submit a screenshot of your final product to Canvas
    4. Check out the Processing documentation

Homework:

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:

Agenda:

  • Binary crash course
  • Integer.MIN_VALUE and Integer.MAX_VALUE
    • Overflow errors
  • Review the 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 Processing
  • Strings
    • Creating Strings
    • indexing starts at 0
    • immutable ~ unchangeable
    • Escape sequence characters
    • Concatenation
      • Try concatenating String, int, and double
    • String Methods (functions)
    • 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:
  • 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:

Agenda:

  • Complete syllabus agreement assignment in Canvas by the end of today
  • Receive/register for 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
    1. You will be given a group Google presentation
    2. Create a new slide
    3. Use your first and last name as your title
    4. 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
  • Create/login to 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 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