AP Comp Sci A 2018-2019-Period 1 Assignments

Upcoming Assignments RSS Feed

No upcoming assignments.

Past Assignments

Due:

Assignment

Elevens Lab
Complete a working Elevens game from  Activity 9. This will require working through most of the preceding activities.
Complete a working Thirteens game from Activity 10

Due:

Assignment

Game of Sticks (Optional)
 
A look at a simple learning AI for a game. Starting Java files are in the common folder
 

Due:

Assignment

Review Materials: This is not graded. It is just a resource to help prepare for the exam
 
Practice Multiple Choice tests
 

Due:

Assignment

CyberSecurity Contest
 
Teams of 1-5
Register at:

Due:

Assignment

Rabbit Hunt
 
Complete the assignment in Google Classroom

Due:

Assignment

CodingBat: 15 questions from the AP-1 set.

Due:

Assignment

Picture Lab: Steganography-Steganography is the science of hiding information in a picture. You can hide a black and white message inside a color picture by first changing all the red values in the original color picture to be an even value (by subtracting one if odd). Make a picture of the same size out of the message that will be hidden. Then loop through both the original picture and the message picture, setting the red value of a pixel in the original picture to odd (by adding one to it) if the corresponding pixel in the message picture is close to the color black. Write an encode method that takes the black and white picture message and changes the current picture to hide the message picture inside of it. Then also write a decode method that returns the picture hidden in the current picture.

Steganography Graded Projects-
  • Hide three different messages in one picture at the same time. One of the hidden messages must be a black and white (not grayscale) lineart image. You should be able to selectively choose which message to decode either by hard-coding the choice into the main method or using the Scanner class to enter the choice.
  • Embed a 3-bit rgb image inside of a picture.

Due:

Assignment

Picture Lab QuickCode: Write two unrelated methods for the Picture class. Full value if complete by 7:45.
  • Write a method int getCountRedOverValue(int value) that returns a count of the number of pixels in the current picture that have a red value more than the parameter value.
  • Write a method setRedToHalfValueInTopHalf() that sets the red value for all pixels in the top half of the picture to half the current red value.
  • Modify the main method in the Picture class to test the two new methods using the Beach picture. Test the first method with values 100 and 200.

Due:

Assignment

Picture Lab 1
Copy the Picture Lab folder from the common drive
Complete parts A1 through A7 of the Picture Lab from the Student Guide
Review the questions at the end of each part

Due:

Assignment

Inheritance Quickcode- Using the files in the Inheritance QuickCode folder in the common drive, create EquilateralTriangle and RightTriangle classes that are derived from the abstract Triangle class. The Right Triangle should create an Isosceles Right Triangle.
 
Provide an appropriate constructor for each of the classes and have them call the superclass's constructor. Redefine the abstract methods appropriately in the derived classes.
 
Complete the declaration statements in the TriangleTester class. Compile all classes and run the TriangleTester.
 
Full Value if complete by end of period.

Due:

Assignment

Monetary Coin Programming Project:
Design and implement a class called MonetaryCoin that is derived from the Coin class from Chapter 4. Create an instance data variable in the MonetaryCoin that stores its value and add a method that returns ts value. Create a main driver class to instantiate ten coins. Flip each coin, print the value and face of the coin and then print the sum of the coins that show heads. Do not replicate any data or methods from the Coin class in the MonetaryCoin class.

Due:

Assignment

ArrayList Quickcode- Using the files in the ArraylistQC folder in the common drive, complete the employeeIsEligible() and processRetirements() methods of the Company class. Copy the entire folder to your G drive folder. Period 1: Full value if completed by end of class.
You should not need to change any class other than the Company class, but you will need to compile the other classes.
Use the CompanyTester class to check that it works correctly.  An employee is eligible for retirement if (s)he meets at least two of the following requirements.
  • The employee is at least RETIRE_AGE years old.
  • The employee has worked for at least RETIRE_YEARS years.
  • The employee's salary is at least RETIRE_SALARY.
 
Method processRetirements removes all retirement-eligible employees from ArrayList myEmployees and maintains the following conditions: the ArrayList is maintained in order by employee ID and myTotalSalary is the total of all salaries of the remaining employees.

Due:

Assignment

Party Class - Final Version
 
Extend the Party Class version 3 to overload your add and remove guest methods so that they will take an ArrayList of Guests as a parameter. The add method should only add the guests if they all meet the requirements for entry. The remove method should remove all of the guests and adjust the appropriate Party instance data.
 
Modify the toString method, if you have written one, so that it prints the number of male and female guests at the party.
 
Modify the driver class so that the new features are tested.

Due:

Assignment

Party class version 3
Reimiplement the Party 2 application using an ArrayList to store the guests. If you have not done so yet, create a Guest class that stores the name, gender, and age of the guest as instance data. Typecast the ArrayList to hold Guest objects.
 
New Considerations:
issues of saving in an open space are handled automatically, but how will you handle maximum party size?

Due:

Assignment

Introduction to ArrayList
(Textbook section 6.7)
Students should be able to create an ArrayList and use the add, set, get, remove, and size methods.
 

Due:

Assignment

Party class version 1

Create a class called Party that will track the names of the current guests of a party. The Party will have a fixed maximum number of guests. The Party class should be able to add guests (if there is room), remove guests, report the number of guests at the party, and check to see if a guest is present at the party.

 

Create a main method in a separate driver class to test the functions of the Party class.

 

Design Questions to consider:

What data type will be used to store the name of a guest?

What data type will be used to store the list of guests?

What other instance data might be needed?

How many constructors do you need?

What are the return types and parameters for each method?

Due:

Assignment

Party class version 2

Modify the Party class from version 1 to add the following:

  • Each guest should have gender and age information.
  • The party should have maximum and minimum ages and only allow guests within that age group.
  • The maximum number of guests must be an even number
  • The number of Male guests and the number of Female guests must be within 3 of each other. If the difference is greater than 3, no additional guests can be added that will increase the difference.

Create a driver class to test the new functions of the Party class.

Design Questions to consider:

  • What data type will be used to store the name of a guest?
  • What data type will be used to store the list of guests?
  • What other instance data might be needed?
  • How many constructors do you need?
  • What are the return types and parameters for each method?

Due:

Assignment

Fall Final Exam Review Sheet: The linked document contains the topics that may be tested on the Final Exam.  Review the list and ask questions about any topic that you do not understand. We have not covered ArrayLists yet, so they will not be included on the final exam.

Due:

Assignment

Array Programming Projects
  • Programming Project 6.1: Design and implement an application that reads a number of integers that are in the range 0 to 50 inclusive and counts how many times each one is entered. After all input has been processed, print all of the values that were entered with the number of times each one was entered. The program should be able to handle any number of integer values.
  • Programming Project 6.2: Change the program from 6.1 so that it works for numbers from -25 to 25.

Due:

Assignment

CodingBat
Array-1: 10 problems

Due:

Assignment

  • Programming Project 5.2: Change the Rational class from Chapter 4 (available in the Common folder) so it implements the Comparable interface. To do the comparison, computer a floating point value from the numerator and denominator for both Rational objects, then compare them using a tolerance value of 0.0001. Write a main driver to test your changes.
  • Programming Project 5.6: Design a Java interface called Lockable that includes the following methods: setKey, lock, unlock, and locked. The setKey, lock, and unlock methods take an integer parameter that represents the key. The setKey method establishes the key. The lock and unlock methods lock and unlock the object, but only if the key used is correct. The locked method returns a boolean of true for locked and false for unlocked. A Lockable object is an object whose regular methods are protected: if the object is locked, the methods cannot be invoked. Redesign and implement a version of the Coin class so that it is Lockable. A locked coin can be looked at to see if it is heads or tails, but it can not be flipped.

Due:

Assignment

  • Interface QuickCode:
    • Copy the Interface QuickCode folder from the common folder to your drive (available after instructions are given in class)
    • Compile all of the files in the folder
    • Create and compile class files for the Eggs, Bacon, and Juice classes that implement the edible interface
    • Run the BreakfastTest file to test completion of the project
    • Full Credit if complete by the end of the period

Due:

Assignment

CodingBat
 
String-2: 10 problems
Logic-2: All 9 problems

Due:

Assignment

Boxcars2
 
Create a new application called Boxcars2 that is a modification of Boxcars from exercise 4.4. The new application will:
  1. Create a PairOfDice object that includes a 6 sided Die and a 10 sided Die
  2. After each initial roll of the PairOfDice, re-roll either Die if it not a 6.
  3. Count a boxcar for any roll of 2 sixes after the re-rolls
  4. Report the number of boxcars after 1000 initial rolls

Due:

Assignment

Computer History 1970-1999
 
 
 
Part 1: Get your decade assignment from the attached file. Use the link above and review the 10 years of your decade. Identify 5 themes that are prominent in the development of computers during your decade. In a Google Doc, list your themes and give at least 3 examples. At least one example should be from a source other than the listed website. Post the document to the Google Classroom Assignment.
 
Part 2: Form a group with 3 other students from the same decade assignment. Share your findings. As a group, create a poster that outlines the major themes from the decade. The poster should use text and images.
 
Part 3: Present your poster to the class on November 13
 

Due:

Assignment

Chapter 4 Programming Projects
 
4.3, 4.4, 4.5

Due:

Assignment

CodingBat
10 problems from Recursion-1

Due:

Assignment

Chapter 3 Programming Projects
3.10, 3.13, 3.14, 3.15

Due:

Assignment

Midterm Exam
  • Period 1 Midterm on Thursday 10/18 (May continue to Friday 10/19)
  • Period 5 Midterm on Wednesday 10/17
  • End of First Quarter Friday 10/19
  • HW: Complete Midterm Study Grid for in class review
    • Page 1 of the grid will be reviewed on Thursday 10/11
    • Page 2 of the grid will be reviewed on Monday 10/15

Due:

Assignment

Quiz: Recursion and Binary
 
Concepts on this quiz:
  • tracing recursive code
  • dragon's rules for recursion
  • converting binary to decimal
  • converting decimal to binary

Due:

Assignment

Magpie Lab Graded Assignment
 
Make a copy of Magpie3 called MagpieFinal and add the following functionality:
 
1. Change the greeting so that Magpie asks for the users name and then stores the name in a variable. The name should then be used randomly in the responses.
 
2. Add code to respond to the phrase "Tell me about..."  Choose two topics with at least two keywords for each topic. Have three responses for each topic. Each time that the user asks about the topic using any associated keyword, it will give a different response. When it runs out of responses for that topic, it should respond "I don't know any more about " with the name of the topic. If the Tell me about phrase is not one of the topics, it should respond "I don't know anything about" with the topic.
 
Make a copy of MagpieRunner3 called MagpieRunnerFinal. Modify it as necessary to make MagpieFinal work.

Due:

Assignment

CodingBat
Complete at least 10 problems from each of the following sets:
  • String-1
  • Logic-1

Due:

Assignment

 
Read Think Java Chapter 4
starting at section 4.8

Due:

Assignment

Magpie Chatbot Lab Activity 3.
 

Due:

Assignment

Introduction to Magpie Chatbot Lab
 
Open the Magpie Lab Student Guide

Activity 1: Getting Acquainted with Chatbots. http://sites.google.com/site/webtoolsbox/bots


Due:

Assignment

Magpie Chatbot Lab Activity 2
 
Copy Magpie Lab Folder from Common Drive to your G: Drive

Activity 2: Introduction to the Magpie Class.
       Open the Magpie2.java and MagpieRunner2.java files using jGrasp.
       Compile both classes. Complete Activity 2.

Due:

Assignment

Weekly Journal #2: Complete in Google Classroom

Due:

Assignment

Blown to Bits part 2: Select at least 3 of the Koans from Chapter 1 of Blown to Bits. Write an example of what the Koan means. Do not use examples that are directly from the article. Post your examples in the appropriate Google Classroom discussion
 

Due:

Assignment

Programming Projects 2.2, 2.3, 2.8, 2.12, 2.13

Due:

Assignment

Computer History through Advertisements
Examine the advertisements from the 1970s and 1980s on the Time Magazine Website
Working with a partner or in a group of three brainstorm questions that are raised by the ads. Think about the historical context of the ad images.
Rewrite any questions that can be answered with one or two words as open-ended questions.
Each person will post two questions in the Google Classroom assignment

Due:

Assignment

Weekly Journal #1: Complete in Google Classroom

Due:

Assignment

Syllabus Verification Form - This form must be returned with parent signature. 20 points by due date. 15 points if late

Due:

Assignment

Read Chapter 1 of Blown to Bits

Due:

Assignment

Inside the Computer Project: Describe how a computer works in two different ways. Post your descriptions in Google Classroom
Method 1: Words
Write a description of how a computer works. Do not be literal, but instead
demonstrate an understanding of the processes and logic involved in the internal
operation of the computer in non computer terms. You may not use any of the words on the restricted list below and you may only use the words “computer,” “device,” and
“system” three times each.
Restricted terms list: CPU, Central Processing Unit, Memory, RAM, ROM, Bit, Byte,
Chip, Motherboard, Drive
Method 2: Pictures
Create a pictorial representation of how a computer works. Again, do not be literal, but demonstrate an understanding of the processes and logic. You may not use pictures of actual computer components in your representation.