AP Comp Sci A 2018-2019-Period 1 Assignments
- Instructors
- Term
- 2018-2019 School Year
- Department
- Practical Arts
- Description
-
Files
Upcoming Assignments
No upcoming assignments.
Past Assignments
Due:
Assignment
Due:
Assignment
Due:
Assignment
Due:
Assignment
Due:
Assignment
Due:
Assignment
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
- 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
Due:
Assignment
Due:
Assignment
Due:
Assignment
- 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.
Due:
Assignment
Due:
Assignment
Due:
Assignment
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
Due:
Assignment
- 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
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
Due:
Assignment
- Create a PairOfDice object that includes a 6 sided Die and a 10 sided Die
- After each initial roll of the PairOfDice, re-roll either Die if it not a 6.
- Count a boxcar for any roll of 2 sixes after the re-rolls
- Report the number of boxcars after 1000 initial rolls
Due:
Assignment
Due:
Assignment
Due:
Assignment
Due:
Assignment
Due:
Assignment
- 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
- tracing recursive code
- dragon's rules for recursion
- converting binary to decimal
- converting decimal to binary
Due:
Assignment
Due:
Assignment
- String-1
- Logic-1
Due:
Assignment
Activity 1: Getting Acquainted with Chatbots. http://sites.google.com/site/webtoolsbox/bots
Due:
Assignment
Activity 2: Introduction to the Magpie Class.
Due:
Assignment
Due:
Assignment
Due:
Assignment
Due:
Assignment
Due:
Assignment
Due:
Assignment
Due:
Assignment
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.