|
AP Computer Science
Advanced Placement Computer Science Page
− General Resources
Good sites dedicated to AP comp sci topics
- link 1
− Unit 1 : Number Systems, Recursion and Constructors
- Day 1 HW:
- 1) Download and install Sun's JDK(the Java Developer's Kit) , BlueJ and Eclipse (You want Eclipse for Java Developers which is the top link)
- 2) Do a google search to determine the definition of 1) 'recursion' and 2) 'base case' . Be prepared to hand in the answers to these questions or to take a quiz on them.
Day 1 Class Work Overloaded constructor
- a) what is 'overloading'(Examples from Jeroo)
- b) what are the 2 ways that we can overload
- c) what is a constructor
- Here is the exact wording of one of the questions.
Below are two snippets of code from a Jeroo program. Underneath each, explain,specifically, how each one exemplifies an ‘overloaded constructor.’
| People Who Took Java Year |
For the others, do the activities listed below at the following URL |
| Recursion |
Do the following numbers 1,3,5,7,11-14 Then do recursion |
Day 2 Class:
Day 2 HW: assigned problems on non-decimal handouts sheet
#4) Recursion in Java
(A+ link) . Download this file that has examples as well as well assignments
Read pages 71 starting with "Constants" through 79)
Week 2
#5) Recursion Groups | Download and use this tool to help you understand your recursion problem
#6) Download and run this program. Explain the output of the 3 different methods. You might want to use Jeliot.
#7) Create a class called MathWrapperin BlueJ and complete the methods asked for
#8) Download this file and run its code to help answer the questions. After you have used the BigDecimal class , visit IBM's page to answer the questions at the bottom of the page.
#9) ImaginaryNumberReducer: This class should have a constructor that takes a single parameter representing the power that the imaginary number,i, is raised to. This class should have the following methods
Week 4
- Java Arrays
- Fun Arrays: ( Grading Rubric )
- Task #1) Make the constructors work correctly by initializing both arrays
- Task #2) Make the methods function as described in the source code for the project
Java Array Project 1
- Power point on Array
- String Array Project
- Two Dimensional Arrays
-
A local zoo wants to keep track of how many pounds of food each of its three monkeys eat each day during a typical week. Write a program that stores this information in a two dimensional 3 * 7 array, where each each row represents a different monkey and each column represents a different day of the week. Generate random numbers representing the amount of food (the random numbers should range from 2 to 8). Then the report should create a report that includes the following information
- Average amount of food eaten per day by the whole family of monkeys
- Least amount of food eaten by any 1 monkey during the course of the week.
- Greatest amount of food eaten by any 1 monkey during the course of the week
- Test
- single and two dimensional arrays
- there will be 1 question involving looping over a Sting as we had on the last test
- at least 1 class declaration question involving constructors, instantiate variables
- a few questions on integer and double division (like last test)
- at least 1 question involving creating a random number within a given range( ie be able to create an random number between 3 and 12 inclusive)
ArrayLists, foreach loops and Interfaces
Sstart Grid World Case Study
-
− Grid World Links
- After you have installed Grid World, do chapter 1 from the student manual. You will have to hand this with your answers on it by Thursday.
- Pages 10- 15 as well as the associated projects and exercises should be done by the upcoming monday
- Inheritence Project
Test
Interfaces in general
- String's implementation of compareTo()
Critters!!
has a relationship vs is a relationship
Sorting and Selecting
- Write a progam that has a single method
- sort(int[] nums). This method should return the array,
num, sorted such that the first element is the largest and the last element is the smallest.
- URL 1 | URL 2
- What you should know? Selection, Insertion and Merge
- Which sort is the best if the list is already in order?
- Which sort is most affected by the array's order (has the most variation based on the items being in order, in reverse or random order)
- Which sort ues a temporary array.
- Which sort is recursive
- Which sort is, in general, the best of the three
- Monday Parts A,B,C (Broccolli..through YummyChecker are due)
-
Create a class called Searcher with 1 method
boolean isThereLinear(int nums[], int x) This method returns true if x is in the array num
- Create a new class called
Recur with the following methods
- Ap-1 Questions from codingBat.com
|