AP Computer Science-2021 - 2022 Assignments

Upcoming Assignments RSS Feed

No upcoming assignments.

Past Assignments

Due:

Capture the Flag event! in Google Classroom

Capture the Flag event!

This year, from June 3-6, the Bergen County Academies CTF team will be running BCACTF 3.0, a full-fledged cybersecurity capture the flag (CTF) competition for high schoolers similar to picoCTF. The Bergen County Academies (BCA) CTF club has spent the past several months writing tons of fun and unique problems, and it's finally ready to play!
 
If you’re looking for a way to explore cybersecurity, CTFs are perfect for you. Whether you are a CTF veteran or just learning how to code, CTFs are fun, intense, and engaging team competitions that put your skills to the test.
 
All US high school students are eligible for prizes from a pool of prizes worth $3000, so form a group of up to five friends and get ready to compete against other teams. If you’ve played many CTFs before, or even if you have never done a CTF in the past, BCACTF 3.0 will be a very enjoyable experience for all skill levels!
 
You can find more information at https://play.bcactf.com/. Good luck and enjoy!

This is optional
Submit the names of your teammates & team name to this assignment.


At the end of the event, the CHS team with the most points will earn a prize for each member!

Due:

Post AP Test Project in Google Classroom

Post AP Test Project

Your task is to put together a proposal for what you plan on working on for the remainder of the school year.  This is the only thing we will be doing in class, but you can work on it outside of classtime if you choose.  Everyone will be presenting at the end of the school year on what you have accomplished during the time allowed.

The written proposal that you will submit should include everything listed in this document and anything else I should know.  We will review your proposals in class over the next few days and being working on our projects.

Due:

Bagel Orders! in Google Classroom

Bagel Orders!

Due:

AP Review Week in Google Classroom

AP Review Week

During ClassMC - Monday
MC - Tuesday
OE - Thursday
OE - MC - Friday (Toss up)


Homework
Monday - OE due Tuesday
Tuesday - OE due Thursday
Thursday - OE due Friday


Complete as many AP-1 questions on Codingbat as possible.


Effort is this final grade before the AP Test.  I will keep track of your progress in the note for this assignment on PowerSchool

Due:

Recursive CodingBat in Google Classroom

Recursive CodingBat

Complete the first 3 plus one more in the recursion section.  Fibb & factorial should be easy because we discussed them in class.  Practice with them, then complete 4 (including the first 3).

Due:

Recursion Problems in Google Classroom

Recursion Problems

By the end of class on Monday, I would like you to complete these two problems.  

There will be an addition on Monday to the second problem to ensure you understand the process.

Due:

CodingBat 4.1 in Google Classroom

CodingBat 4.1

Finish 3 more in AP - 1 (10 total)

Due:

CodingBat 3.8 in Google Classroom

CodingBat 3.8

Finish Array-2 (33 total, 25 complete so far)

Due:

PixLab 4 in Google Classroom

PixLab 4

Collage
Edge Detection

Due:

PixLab 3 in Google Classroom

PixLab 3

A6


Mirror
T-B
B-T
L-R
R-L
Diag


Temple
Seagull
Snowman

Due:

PixLab 2 in Google Classroom

PixLab 2

A4 & A5
InArrayWorker


negate
greyscale
keepOnlyBlue
fixUnderwater

Due:

CodingBat 3.7 in Google Classroom

CodingBat 3.7

  Array 2 - 10 more (15 done, need 25 total)  

Due:

PixLab 1 in Google Classroom

PixLab 1

Review the Student Guide.  Answer the questions in A1-A3.

Due:

CodingBat 3.6 in Google Classroom

CodingBat 3.6

Finish String 2 (21 total, 15 done so far)
5 more Array 2 (15 total, 10 done so far)

Due:

Which of these lines of code would give a compiler error?  It may be multiple lines. in Google Classroom

Which of these lines of code would give a compiler error? It may be multiple lines.

   Freshman frosh = new Sophomore();

    Student soph = new Sophomore();

    Junior Jun = new Junior();

    Senior Sr = new Student(); 

Due:

CodingBat 3.5 in Google Classroom

CodingBat 3.5

Complete 3 more in AP-1 (7 total)

Due:

Student Extension in Google Classroom

Student Extension

In your groups, build a subclass to your student class that matches your assignment (FR, SO, JR, SR).  Add in 2 instance variables, int stress and _____ where it is class specific.


Create the constructors with no parameters and with all parameters.  Utilize super to shorten your code.


Add accessors for the two new variables.


Modify the goToSchool and dayOff methods to include the two new instance variables.

Due:

Codingbat 3.4 in Google Classroom

Codingbat 3.4

Finish Logic 2 (9 total, done 5 so far)
5 more in String 2 (15 total)

Due:

Class Videos in Google Classroom

Class Videos

Log onto AP Classroom and review the videos I checked off for you on Chapter 9.  Watch them first, try out some of the code they are creating and talking about.  Then work in groups or alone on the Classes "quiz" I set up.  Use your computer to test code. 


When you are done, I want you to post in a private note on this assignment in google classroom the (at least) 3 different takeaways that you had from these questions and their answers.  If you have any follow up questions, ask them to your neighbors then ask here.

Due:

Student class in Google Classroom

Student class

Finish your student class.
Private instance variables
public constructors
public accessors (get methods)
public mutators (set methods)


Tomorrow we will work on Tester classes, toString and the next steps

Due:

CodingBat 3.3 in Google Classroom

CodingBat 3.3

5 more in Strings 2 (10 total)
5 more in Array 2 (10 total)

Due:

Wordle Assignment in Google Classroom

Wordle Assignment

Using the description on the handout, produce a class that will act accordingly.  Then build a tester class to test your program.  I will use my tester class to grade your assignment.

Due:

CodingBat 3.2 in Google Classroom

CodingBat 3.2

5 in Array 2
2 more in AP 1 (4 total)

Due:

Peevish Postman in Google Classroom

Peevish Postman

Create the following tester program using the Door class given.  Set it up to answer the attached, and then when you determine the pattern to the doors post your resulting explanation of the pattern here.

Due:

Class Creation in Google Classroom

Class Creation

Review these notes on Classes.  Build a BankAccount class and a BankAccountTester in the same project.  Make the tester your Main class to make it easier when running.  Create the instance variable for the balance, constructor for building a BankAccount object with a parameter for balance, methods for deposit and withdraw and getBalance according to the notes.  Test your program by creating a BankAccount object in your tester class, deposit money and withdraw money, then output the balance.  We will be expanding this class tomorrow.

Due:

CodingBat 3.1 in Google Classroom

CodingBat 3.1

Logic 2 - 5 total
String 2 - 5 total

Due:

CodingBat 2.9 in Google Classroom

CodingBat 2.9

Finish String 1 (33 total, 25 so far)
Complete 2 AP1 Questions

Due:

Magic Square in Google Classroom

Magic Square

Create a program that will ask for the integer values in a 3x3 array and fill the array in row major order.

Then check if it is a magic square:
None of the entries in the 2D array are the same - they are the values from 1 to 9 (3x3, they would be 1 to 16 in a 4x4).

There is a sum that all of the below add to.
-Each row adds up to that number
-Each col adds to that number
-Both Diagonals add to that number

Have the program print out whether or not it is a magic square.
Test
1 1 1 1 1 1 1 1 1 (false)
1 2 3 4 5 6 7 8 9 (false)
8 1 6 3 5 7 4 9 2 (true)





Part 2:
Fork your program (to save your original) and expand on the program to accept an input from the user to say how many rows/cols your square has before accepting the values in each row/col.  Return whether or not the inputted square is a magic square.  Attached is a document with test cases for varying sizes.

Due:

CodingBat 2.8 in Google Classroom

CodingBat 2.8

Finish Logic 1 - 10 more (30 total)
String 1 - 5 more (25 total)

Due:

CodingBat 2.7 in Google Classroom

CodingBat 2.7

5 more in Logic 1 (20 total)
10 more in String 1 (20 total)

Due:

Tic Tac Toe in Google Classroom

Tic Tac Toe

Fork this project, and make it work!  Don't let the player pick values outside of the range.  Don't let them choose a spot that is filled, and lose their turn. Check for the winner after each turn.

Due:

2D array Practice in Google Classroom

2D array Practice

1. Create a program that will create a 2D array that holds the values matching a phone keypad. If you were to get both the letters and the numbers in there, what type should the array be? Print out the Array.

2. Create a program that will create a 3x3 array of random integers between 1 and 100. Print out the array. Then, write a method that will calculate the sum of a row of a 2D array. Call it rowSum (int [] [] arr, int row) where arr is the 2D array, and row is the # of the row it is adding up. Then create colSum(int [] [] arr, int col) with the same idea. Have your program print out each row sum and each col sum with the appropriate labels. To ensure it works, change your array to a 4x4 and run it again.

Due:

codingBat 2.6 in Google Classroom

codingBat 2.6

Finish Array 1  - 7 more (27 total)
Logic 1 - 5 more (15 total)


Should have Warm Up 1 and Warm Up 2 completed.  If you do not, finish those as well.



Due:

Sorting algorithms in Google Classroom

Sorting algorithms

Use the resources to create a program that has each of these sorting algorithms (bubble, insert, selection) take a random  array and sort it.  Do not just copy and paste the code (I know you can do that).  Try to write the code based on the videos and the animations.  Test test test your algorithms.  


This is a participation grade.  Share what you have and I can give feedback if you have questions.  Not in realtime, but I will get back to you.  When we get back we will have a little activity on recognizing the code for each of these algorithms - the AP test hasn't asked to write a sorting algorithm, just to debug a broken one or recognize what one does given particular info.  Big O notation will be the first 2 levels of college programming, but you should be aware of it.

Due:

Searching & Sorting Algorithms in Google Classroom

Searching & Sorting Algorithms

Fill out the Google Form based on the Google Doc info.  


Identify the sorting algorithms as Bubble, Insert or Selection.  Also identify if the resulting array will be non-increasing or non-decreasing.  


Identify the other random methods based on what they do.  Be as specific as you can; they are methods that would help search (linear vs binary search) or analyze or change arrays in a particular manner.

Due:

Searching Algos in Google Classroom

Searching Algos

Create a program in which the main method contains:
an unsorted array
a sorted array
an unsorted ArrayList
a sorted ArrayList
print all collections
run appropriate methods on the collections (unsorted array - sequential find, sorted ArrayList - binary find, etc.)


Other Methods needed:
print  - two versions, one takes the array as a parameter and the other is an ArrayList as a parameter
searching methods that return the location in which you found the value x, or -1 if you did not find it.
findSequentialArray(int [] arr, int x)
findBinaryArray(int [] arr, int x)
findSequentialArrayList(ArrayList arr, int x)
findBinaryArrayList(ArrayList arr, int x)

Due:

Codingbat 2.5 in Google Classroom

Codingbat 2.5

5 more in Logic 1 (10 total)
5 more in Array 1 (20 total)
5 more in String 1 (10 total)

Due:

ArrayList Lab in Google Classroom

ArrayList Lab

Create a program that will contain the two following methods dealing with ArrayLists.


For simplicity, use 
Collections.sort(yourArrayListThatNeedsToBeSorted);  


And adjust the import line to java.util.*;


In order to ensure the ArrayList you are passing will be sorted.

Due:

CodingBat 2.4 in Google Classroom

CodingBat 2.4

Finish Warm Up 2 (17 total, 5 already done)

Due:

Codingbat 2.3 in Google Classroom

Codingbat 2.3

Complete 5 in Logic 1
Complete 5 in Strings 1
Complete 5 more in Array 1 (15 total)

Due:

File Input Text Array in Google Classroom

File Input Text Array

Due:

Array Lab 2 - Finding, reversing, filling, isSorted in Google Classroom

Array Lab 2 - Finding, reversing, filling, isSorted

Use the attached as a starting point.


a) findValue - takes an array and an integer as a parameter, and returns if the value is found within the array (true/false)
b) reverseArray - takes an array as a parameter, and returns the reverse of the array EX: {1,2,3} --> {3,2,1}
c) fillArray - takes two integers as parameters, the first determines how many values are within the array, and the second determines the
max value it will be filled with. An array is then filled with random numbers from 1 to the max value and then returned.
d) isSorted - takes an array as a parameter and returns whether or not it is in non-decreasing order.

Due:

Static Arrays in Google Classroom

Static Arrays

Build a program that has the following methods using a static array of Strings.  Create the following methods that don't take parameters but access the static array.


countVowels - analyzes at each String and counts how many vowels there are (aeiou).  Returns the count
countLetters - counts the length of each String and returns the sum of the lengths
find(String letter) - counts and returns the number of times the String letter appears in all of the words.  Precondition: Letter will have length 1.

Due:

CodingBat 2.2 in Google Classroom

CodingBat 2.2

Complete 5 more in Array 1 (10 total)
Complete 5 in Warm Up 2

Due:

Array Lab - Grades in Google Classroom

Array Lab - Grades

Due:

CodingBat 2.1 in Google Classroom

CodingBat 2.1

5 in Array 1
Finish Warm Up 1

Due:

CodingBat 1.2 in Google Classroom

CodingBat 1.2

WarmUp 1 - You should have 12 completed so far.  To earn all 5 points, you must have 24 completed by Monday (12 new ones).

Due:

Method String Practice in Google Classroom

Method String Practice

Today's project you will create is similar to yesterdays but involves Strings.


A) Create a method that takes a String input and returns the String without any vowels (AEIOU). - input: "banana", returns "bnn"
B) Create a method that takes a String input and returns the String with it's reverse concated at the end - input: "computer", returns "computerretupmoc"
C) Create a method that takes a String input and follows the attached image's rules about making the word plural, and returns the plural version of the word.  Know that there are at least 9 more rules, plus exceptions to these rules, I am just looking for these two.
D) Create a method that takes two Strings and zipper joins them into one word.  The method will return that new word.  - input "Cranford" "Banana"  returns "CBraannafnoard".  Note that words may not be the same length, but they will at least have a length of 1.
E) Create a main method that takes user input to test these methods.  Make a menu to ask the user for input as to which method to do each time the program is run.

Due:

Method Practice in Google Classroom

Method Practice

Complete this program testing out method creation.

Due:

AP Classroom Assessment on Iteration in Google Classroom

AP Classroom Assessment on Iteration

Log onto AP Classroom and individually complete the


Unit 4 Progress Check: MCQ



Due:

Iteration - Nested Loop Problems in Google Classroom

Iteration - Nested Loop Problems

Due:

Iteration Labs in Google Classroom

Iteration Labs

Basic iteration programs

Due:

MagPie Assessment in Google Classroom

MagPie Assessment

Complete these questions and then pick up your take home portion.

Due:

MagPie using statement parts in response in Google Classroom

MagPie using statement parts in response

Review Student Guide
Have your MagPie respond to "I want ____ "   "I like ____ " and "I ___ you " where the blanks are used in the response from the program.

Add one more response where part of the user's statement is used in the response.
Add 2 more non-committals (10 total).

Due:

findKeyword in Google Classroom

findKeyword

Adjust all indexOfs to findKeyword
Add more keyword decisions until you have at least 10 total (plus the empty String one)
Add more non-Committals until you have have at least 8 total

Due:

MagPie First Assignment in Google Classroom

MagPie First Assignment

Pets
Teacher
Empty Message (Trim)
2 more non-committal
3 more keywords (single words or groups of words)

Due:

MagPie in Google Classroom

MagPie

Open this link, and create a fork of it.  Send me a link to that new project here.  The Student Guide is attached.  The specific assignments will be posted on classroom, this one is just making sure that you can get the program into your replit and run it.

Due:

AP style questions in Google Classroom

AP style questions

Log into AP Classroom - complete the questions on Strings.

Due:

String Problems in Google Classroom

String Problems

Complete the following programs.  For the month program, make sure you are only using a decision to check for proper input, no other decision is allowed.  Remember, this is a String assignment.

Due:

Lab work for 9/27 in Google Classroom

Lab work for 9/27

Once you complete your previous assignments (dice, ap classroom), this is your next lab on decisions. Read carefully.  This is a college level lab assignment. 

Due:

Decisions Lab in Google Classroom

Decisions Lab

Create a program that rolls 2 6 sided dice (random number between 1 and 6).  Then the program should output the sum of the two rolls and identify if the numbers add up to 7 ("Craps")  to 2 ("Snake Eyes") or 12 ("Boxcars").  If none of those special rolls occur, check for doubles (two rolls are the same) and output "Doubles" or "Not Doubles".

Due:

AP Classroom - Decisions Practice in Google Classroom

AP Classroom - Decisions Practice

Log into AP Classroom, and check out the videos posted.  The questions are designed to get you more familiar with the type of questions that will be on the AP test, so this first one that I am giving you is for your benefit.  I will only be grading you on completion, and will answer any questions you might have on Monday.  

Due:

Decisions Homework in Google Classroom

Decisions Homework

Worksheet - if you missed picking it up in class.

Due:

Variable Lab in Google Classroom

Variable Lab

1. Create a program that asks for the user's name and grade, and outputs the information as "Hello ______, welcome to the __th grade."

2. Create a program that asks the user for an integer temperature in F, and outputs its correlating degree in C. Make sure it is accurate to the nearest hundredth.

3. Create a program that asks the user for the distance to their goal and the amount of time they have to get there. It would then calculate the average speed you must go in order to get there to the nearest MPH. Remind them that it doesn't account for lights & traffic.

Due:

Day one assignment in Google Classroom

Day one assignment

Create a program that stores 2 int variables, and then prints the sum, product, quotient, difference and remainder.  Make sure to label which is which and what the initial variable values are.

Due:

Variable Worksheet in Google Classroom

Variable Worksheet

Complete this assignment as an individual or as a group.

Due:

AP Classroom Sign Up in Google Classroom

AP Classroom Sign Up

Sign up using the code: EQ4QDL


AP exam registration will be open Wednesday, September 15 through Wednesday, October 27, 2021 for $96 per exam. It is a 2 step process to register and step 1 is due by the end of the first full week of school. 


1. Students must join the AP class through MyAP and enter the join code for your class. 
2. Students then pay for exams through AP Test Service.  We will discuss this in class before the registration opens.  It is strongly recommended but not required.  

Due:

Summer Assignment in Google Classroom

Summer Assignment

Make sure you check the correct file based on if you took intro or not.