Difference between revisions of "AP Computer Science"

From WLCS
(462 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Wednesday (9/30/15) ==
+
== Tuesday (2/12/19) ==
'''Warmup:'''
+
'''Agenda:'''
* Open up tabs for:
+
* Class construction, object usage, & object arrays quiz
*# [http://www.eimacs.com eIMACS]
+
* Complete and demo War Card "Game"/Simulation
*# [http://www.pythontutor.com/java.html#mode=edit Java Visualizer]
+
** Display how many cards each player has at the beginning of each round
 +
** You should display messages like "Player 1 reveals X of X"
 +
** Display a message of who wins each "round"
 +
** Display "I declare war!"
 +
** Display the eventual winner
  
 +
== Wednesday - Friday (2/6/19 - 2/8/19) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Grade Calculator walk-through
+
* Complete and submit Poker Hands: Part 1 to repl.it
* Iteration
+
* Introduction to ArrayLists
* While loops
+
** AP CS reference card for ArrayLists
*# Print out all the numbers from 0-50
+
** eIMACS ArrayLists chapter review
*# Print out all the numbers from 75 down to 25
+
** Memorize / study ArrayList<E> instance methods
*# Write a loop that prints out the first 100 even numbers
+
* Processing - Ball example w/ ArrayLists
*# Prompt the user for a number and store it in a variable n, then print out the first n odd numbers (starting at 1) using a loop
+
* Processing - millis() timer example
*# Print out all the numbers that are divisible by 6 from 0 through 100
+
* Item Collection w/ ArrayLists
 +
*# Re-implement your Item Collection game so that it uses ArrayLists instead of arrays
 +
*# Start with an ArrayList of 1 robot, and add new robots every 3 seconds
 +
*# Start with an ArrayList of 5 items, and remove items when the player collides with them
 +
* ArrayList<Card> examples
 +
* War Card "Game"/Simulation
 +
*# Use NetBeans and create a new project for War
 +
*# The Main.java file will be the simulation
 +
*# Create a new Java class (name the file Card.java) and paste your Card class there
 +
*# Design and implement the game/simulation (we will design as a class)
  
== Monday (9/28/15) ==
+
== Monday (2/4/19) ==
'''Warmup:'''
+
'''Agenda:'''
* Check if you are missing any work
+
* Demo Item Collection Game w/ Object Arrays
 +
* Complete Card class in repl.it (should be done today)
 +
* Work on Poker Hands: Part 1 in repl.it - '''due Thursday (2/6/19)'''
  
 +
== Thursday (1/31/19) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Java IDEs (NetBeans, Eclipse, IntelliJ IDEA, etc.)
+
* Demo Item Collection Game
* Java Input using Scanner object
+
* Arrays of Objects
* NetBeans Practice
+
** String arrays (review)
*# Open NetBeans
+
** Ball class and Ball array
*# Create a new Java Application
+
* Item Collection Game w/ Object Arrays (assignment)
*# Title the application: GradeCalculator
+
*# Copy your Item Collection Game to a new Processing sketch
*# Create an array to store 7 numerical grade points (what type should this be?) in the 4 or 5 pt range
+
*# Convert your item Sprites collected into an array
*# Prompt the user for each grade and store it in each element of the array
+
*# Convert your robot Sprites into an array
*# Calculate your overall GPA
+
*# Demo your converted game on '''Monday (2/4/19)'''
*# Use conditional statements to print out the correct letter grade
 
  
'''Homework:'''
+
== Tuesday (1/29/19) ==
# Complete any missing work (activities, tests)
+
'''Agenda:'''
# Read Iteration and While Loops
+
* Item Collection Game - '''due Thursday (1/31/19)'''
 
+
*# We will design a simple top-down item collection game using a new Sprite class (specified below)
== Thursday (9/24/15) ==
+
*# Find and download Sprite images of your choosing
'''Warmup:'''
+
*# You can move the player sprite with the keyboard (wrap the player to the other side of the screen if you go off screen)
* Complete Activity 5
+
*# The player sprite will be able to collect item sprites
 +
*# Robot sprites will follow the player around
 +
*# You win when you collect all the items
 +
*# You lose if a robot collides with your sprite
 +
* Sprite class (has similarities to the previous Sprite class)
 +
** Attributes:
 +
*** double x, y (to be used for position)
 +
*** double dx, dy (to be used for step size when moving -- always positive)
 +
*** PImage img (stores the image)
 +
*** boolean visible (default setting is true -- we will use this variable to track the Sprite's visibility state)
 +
** Constructors:
 +
*** Sprite()
 +
*** Sprite(String imgfile, double x, double y, double dx, double dy)
 +
** Methods:
 +
*** void display() - if visible is true, then display the image
 +
*** void moveLeft() - move x-coordinate to the left by dx amount
 +
*** void moveRight() - move x-coordinate to the right by dx amount
 +
*** void moveUp() - move y-coodrinate upwards by dy amount
 +
*** void moveDown() - move y-coodrinate downwards by dy amount
 +
*** boolean checkCollision(Sprite other) - returns true if this Sprite is colliding with the other Sprite (use previous Sprite class to help with this method)
 +
*** void follow(Sprite other) - compare x and y coordinates of this Sprite with the other Sprite -- move this Sprite towards other Sprite by using the move____() methods
  
 +
== Tuesday - Thursday (1/22/19 - 1/24/19) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Student accounts
+
* [https://drive.google.com/file/d/1tQc3yOyfjy7xN6oz0glIeFHqJgORmuAd/view?usp=sharing Dino Game example]
** Username: first initial + last name
+
** We will convert the non-OOP version into an [https://drive.google.com/file/d/1FAO7kdtVrYrrO4jgcRMap3S3UtDqFe_W/view?usp=sharing OOP version]
** Password: student ID #
+
** Add another cactus to the dino game
* Homework?
+
* Flappy Bird OOP
** Penalty for incompletes
+
** What modifications to our Sprite class do we need to make?
** Check your grades to see if you have any incompletes
+
** Here are some Flappy Bird sprite images [https://drive.google.com/file/d/1UugFrLPjeA8YPXOlmOxjIvzd6HdvpupA/view?usp=sharing here]
* Arrays review
+
** Implement the OOP version of Flappy Bird in Processing
 +
** Bird will need to flap when a key is pressed
 +
** Pipes will need to move and wrap around the screen
 +
** Score increases when a pipe is passed (this will require something to be added to the Sprite class)
 +
** Lose when bird collides with a pipe or when the Bird goes too far below the screen
 +
** Due '''Thursday (1/24/19)''' -- last assignment of 2nd Quarter
  
'''Homework:'''
+
== Thursday (1/17/19) ==
# Read Conditional statements (if-statements)
 
# Read Blocks
 
# Complete Activity 6
 
# Complete Test 6
 
 
 
== Tuesday (9/22/15) ==
 
 
'''Warmup:'''
 
'''Warmup:'''
* Complete Activity 3 if unfinished
+
* Submit your Circle class to repl.it
* Complete Test 3 if unfinished
 
  
 
'''Agenda:'''
 
'''Agenda:'''
* Booleans
+
* Object-Oriented Programming cont'd
* Relational Operators
+
** OOP Review - attributes, constructors, setters, getters, public vs. private, this
* Comparing Strings
+
** toString() method (using the Point class)
* Logical Operators
+
** Submit Point class to repl.it
* Complete Activity 4: Booleans
+
** [https://docs.google.com/presentation/d/1hb_8wMUlQQl7W-JF2f3gax021yDHLkLENJYy0fUMGy8/edit?usp=sharing Classes (Java) slides]
* Complete Test 4
+
* Complete the Car class assignments in repl.it
* Arrays!!!
+
* [https://drive.google.com/file/d/1tQc3yOyfjy7xN6oz0glIeFHqJgORmuAd/view?usp=sharing Dino Game example]
* Finish reading Arrays
+
** Add another cactus to the dino game
  
 
'''Homework:'''
 
'''Homework:'''
# Complete Activity 4
+
* Complete eIMACS: Activity 14: Address Objects
# Complete Test 4
 
# Finish reading Arrays
 
# Complete Test 5
 
  
== Friday (9/18/15) ==
+
== Tuesday (1/15/19) ==
'''Warmup:'''
+
* Snow Day
* Complete Activity 2.1 - 2.4 (it will count for a grade)
 
  
 +
== Friday (1/11/19) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Strings
+
* Object-Oriented Programming cont'd
** Concatenation (connecting/adding together)
+
** Person class review
** Methods - length(), substring(), indexOf()
+
** Vocab:
** Converting to Strings
+
*** class vs object
* Displaying messages
+
*** declaration vs instantiation
** System.out.print() and System.out.println()
+
** Point class example
* Complete Activity 3
+
** Point object instantiation
* Complete Test 3
+
** Point object usage
 +
** [https://docs.google.com/presentation/d/1hb_8wMUlQQl7W-JF2f3gax021yDHLkLENJYy0fUMGy8/edit?usp=sharing Classes (Java) slides]
 +
** Circle class example
 +
** [https://drive.google.com/file/d/1tQc3yOyfjy7xN6oz0glIeFHqJgORmuAd/view?usp=sharing Dino Game example]
  
 
'''Homework:'''
 
'''Homework:'''
* Complete Activity 3 if unfinished
+
* Create a Circle class and test it out
* Complete Test 3 if unfinished
+
* Follow the [https://docs.google.com/presentation/d/1hb_8wMUlQQl7W-JF2f3gax021yDHLkLENJYy0fUMGy8/edit?usp=sharing Classes (Java) slides]
 
 
== Wednesday (9/16/15) ==
 
'''Warmup:'''
 
* If you have not taken Test 1, then you must do so NOW
 
  
 +
== Wednesday (1/9/19) ==
 
'''Agenda:'''
 
'''Agenda:'''
* Tests and grade curving
+
* Cornell Engineering Diversity Programs - one-week residential programs:
** Grades will be curved to the class average and standard deviation as a whole
+
** [https://sites.coecis.cornell.edu/catalystacademy/ Catalyst Academy] - juniors and seniors from underrepresented backgrounds
* Types and casting review
+
** [https://sites.coecis.cornell.edu/curieacademy/ Curie Academy] - high school girls who excel in math and science
* Arithmetic Expressions
+
* Recursion quiz
* Pitfalls and Surprises 1 2
+
* Submit Recursion Problems to repl.it
* Declaring and Assigning Values to Variables
+
** public static int count(String s, String ch) - returns the number of occurrences of ch (single character string) within s
* Programming Shortcuts
+
** public static String reverse(String s) - returns the reversed String s
* Complete Activity 1: Rounding
+
** public static int reverse(int i) - returns an int that is the full digit reversal of i (e.g. 1234 -> 4321)
 +
* Introduction to Object-Oriented Programming
 +
** [https://repl.it/@paulbui/SimpleProgramWithoutOOP Simple program without OOP example]
 +
** Simple program with OOP example
 +
** Point class example
 +
** Point object instantiation
 +
** Point object usage
 +
** [https://docs.google.com/presentation/d/1hb_8wMUlQQl7W-JF2f3gax021yDHLkLENJYy0fUMGy8/edit?usp=sharing Classes (Java) slides]
 +
** Circle class example
  
 
'''Homework:'''
 
'''Homework:'''
# Complete syllabus agreement form online
+
* Complete and submit recursion problems to repl.it
# Take Test 2
+
* Review SimpleProgramWithOOP notes that we did in class
  
== Monday (9/14/15) ==
+
== Monday (1/7/19) ==
* Lab cleanup & setup
+
* Don't forget to complete Activity 13 (due tonight)
** Wipe down desk areas
+
* Recursion Quiz Wednesday (1/9/19)
** Keyboards, mice
+
** Multiple choice questions
** Cables: power, network
+
** Free-response question(s)
* Introduction to Java
+
* Recursion Review & Practice
** [[Media:IntroJava.ppt]]
+
* Recursion Problems (prepare to submit to repl.it)
** [http://www.pythontutor.com http://www.pythontutor.com] - Code Visualizer
+
** public static int count(String s, String ch) - returns the number of occurrences of ch (single character string) within s
** [http://en.wikipedia.org/wiki/Hello_world_program Hello world program]
+
** public static String reverse(String s) - returns the reversed String s
* Notetaking
+
** public static int reverse(int i) - returns an int that is the full digit reversal of i (e.g. 1234 -> 4321)
*# Use Google Drive
 
*# Title the notes by class and date
 
* eIMACS - Java Basics->Variables and Expressions
 
** int, double, E notation
 
** casting
 
** Take Test 1
 
  
'''Homework:'''
+
== Monday - Friday (12/31/18 - 1/4/19) ==
# Syllabus agreement form online
+
* Winter Break
# Complete casting section
 
# Take Test 1
 
  
== Thursday (9/10/15) ==
+
== Archives ==
* Name cards
+
* [[APCS - 1819 - December]]
* Complete the [https://docs.google.com/spreadsheet/viewform?key=0ApPgoX5sTp-_cDZfazFTTWJTMnp2TUhKTkpCQmtGUEE Student Survey]
+
* [[APCS - 1819 - November]]
* Misc logistics
+
* [[APCS - 1819 - October]]
** 20/10 no pass policy
+
* [[APCS - 1819 - September]]
** Location of bathrooms
+
* [[APCS - 1718]]
** Sign in/out sheets
+
* [[APCS - 1516]]
** Mr. Bui has C Lunch (3rd Lunch)
 
* [[AP Computer Science Syllabus]]
 
** Complete online syllabus agreement form by the end of next week (9/18/15)
 
* [http://classroom.google.com Google Classroom]
 
** Sign into your APS Google accounts
 
** Class code: 9tr0sv0
 
* [http://www.eimacs.com www.eimacs.com]
 
** Sign up for accounts (via Mr. Bui)
 
** Login!
 
* What is computer science?
 
* Introduction to Java
 
** [[Media:IntroJava.ppt]]
 
** [http://www.pythontutor.com http://www.pythontutor.com] - Code Visualizer
 
** [http://en.wikipedia.org/wiki/Hello_world_program Hello world program]
 
 
 
'''Homework:'''
 
# Go to Syllabus (on the left)
 
# Read it
 
# Complete the agreement form with your parent (you will need your APS Google login)
 
 
 
== Tuesday (9/8/15) ==
 
* Introductions
 
* Name cards
 
 
 
'''Homework:'''
 
# Go to Syllabus (on the left)
 
# Read it
 
# Complete the agreement form with your parent (you will need your APS Google login)
 

Revision as of 07:03, 12 February 2019

Tuesday (2/12/19)

Agenda:

  • Class construction, object usage, & object arrays quiz
  • Complete and demo War Card "Game"/Simulation
    • Display how many cards each player has at the beginning of each round
    • You should display messages like "Player 1 reveals X of X"
    • Display a message of who wins each "round"
    • Display "I declare war!"
    • Display the eventual winner

Wednesday - Friday (2/6/19 - 2/8/19)

Agenda:

  • Complete and submit Poker Hands: Part 1 to repl.it
  • Introduction to ArrayLists
    • AP CS reference card for ArrayLists
    • eIMACS ArrayLists chapter review
    • Memorize / study ArrayList<E> instance methods
  • Processing - Ball example w/ ArrayLists
  • Processing - millis() timer example
  • Item Collection w/ ArrayLists
    1. Re-implement your Item Collection game so that it uses ArrayLists instead of arrays
    2. Start with an ArrayList of 1 robot, and add new robots every 3 seconds
    3. Start with an ArrayList of 5 items, and remove items when the player collides with them
  • ArrayList<Card> examples
  • War Card "Game"/Simulation
    1. Use NetBeans and create a new project for War
    2. The Main.java file will be the simulation
    3. Create a new Java class (name the file Card.java) and paste your Card class there
    4. Design and implement the game/simulation (we will design as a class)

Monday (2/4/19)

Agenda:

  • Demo Item Collection Game w/ Object Arrays
  • Complete Card class in repl.it (should be done today)
  • Work on Poker Hands: Part 1 in repl.it - due Thursday (2/6/19)

Thursday (1/31/19)

Agenda:

  • Demo Item Collection Game
  • Arrays of Objects
    • String arrays (review)
    • Ball class and Ball array
  • Item Collection Game w/ Object Arrays (assignment)
    1. Copy your Item Collection Game to a new Processing sketch
    2. Convert your item Sprites collected into an array
    3. Convert your robot Sprites into an array
    4. Demo your converted game on Monday (2/4/19)

Tuesday (1/29/19)

Agenda:

  • Item Collection Game - due Thursday (1/31/19)
    1. We will design a simple top-down item collection game using a new Sprite class (specified below)
    2. Find and download Sprite images of your choosing
    3. You can move the player sprite with the keyboard (wrap the player to the other side of the screen if you go off screen)
    4. The player sprite will be able to collect item sprites
    5. Robot sprites will follow the player around
    6. You win when you collect all the items
    7. You lose if a robot collides with your sprite
  • Sprite class (has similarities to the previous Sprite class)
    • Attributes:
      • double x, y (to be used for position)
      • double dx, dy (to be used for step size when moving -- always positive)
      • PImage img (stores the image)
      • boolean visible (default setting is true -- we will use this variable to track the Sprite's visibility state)
    • Constructors:
      • Sprite()
      • Sprite(String imgfile, double x, double y, double dx, double dy)
    • Methods:
      • void display() - if visible is true, then display the image
      • void moveLeft() - move x-coordinate to the left by dx amount
      • void moveRight() - move x-coordinate to the right by dx amount
      • void moveUp() - move y-coodrinate upwards by dy amount
      • void moveDown() - move y-coodrinate downwards by dy amount
      • boolean checkCollision(Sprite other) - returns true if this Sprite is colliding with the other Sprite (use previous Sprite class to help with this method)
      • void follow(Sprite other) - compare x and y coordinates of this Sprite with the other Sprite -- move this Sprite towards other Sprite by using the move____() methods

Tuesday - Thursday (1/22/19 - 1/24/19)

Agenda:

  • Dino Game example
    • We will convert the non-OOP version into an OOP version
    • Add another cactus to the dino game
  • Flappy Bird OOP
    • What modifications to our Sprite class do we need to make?
    • Here are some Flappy Bird sprite images here
    • Implement the OOP version of Flappy Bird in Processing
    • Bird will need to flap when a key is pressed
    • Pipes will need to move and wrap around the screen
    • Score increases when a pipe is passed (this will require something to be added to the Sprite class)
    • Lose when bird collides with a pipe or when the Bird goes too far below the screen
    • Due Thursday (1/24/19) -- last assignment of 2nd Quarter

Thursday (1/17/19)

Warmup:

  • Submit your Circle class to repl.it

Agenda:

  • Object-Oriented Programming cont'd
    • OOP Review - attributes, constructors, setters, getters, public vs. private, this
    • toString() method (using the Point class)
    • Submit Point class to repl.it
    • Classes (Java) slides
  • Complete the Car class assignments in repl.it
  • Dino Game example
    • Add another cactus to the dino game

Homework:

  • Complete eIMACS: Activity 14: Address Objects

Tuesday (1/15/19)

  • Snow Day

Friday (1/11/19)

Agenda:

  • Object-Oriented Programming cont'd
    • Person class review
    • Vocab:
      • class vs object
      • declaration vs instantiation
    • Point class example
    • Point object instantiation
    • Point object usage
    • Classes (Java) slides
    • Circle class example
    • Dino Game example

Homework:

Wednesday (1/9/19)

Agenda:

  • Cornell Engineering Diversity Programs - one-week residential programs:
  • Recursion quiz
  • Submit Recursion Problems to repl.it
    • public static int count(String s, String ch) - returns the number of occurrences of ch (single character string) within s
    • public static String reverse(String s) - returns the reversed String s
    • public static int reverse(int i) - returns an int that is the full digit reversal of i (e.g. 1234 -> 4321)
  • Introduction to Object-Oriented Programming

Homework:

  • Complete and submit recursion problems to repl.it
  • Review SimpleProgramWithOOP notes that we did in class

Monday (1/7/19)

  • Don't forget to complete Activity 13 (due tonight)
  • Recursion Quiz Wednesday (1/9/19)
    • Multiple choice questions
    • Free-response question(s)
  • Recursion Review & Practice
  • Recursion Problems (prepare to submit to repl.it)
    • public static int count(String s, String ch) - returns the number of occurrences of ch (single character string) within s
    • public static String reverse(String s) - returns the reversed String s
    • public static int reverse(int i) - returns an int that is the full digit reversal of i (e.g. 1234 -> 4321)

Monday - Friday (12/31/18 - 1/4/19)

  • Winter Break

Archives