Post on 02-Jan-2016
description
Agenda
• AP Computer Science exam• Ap Exam question types• Ap scores calculation• Topics for the AP exam• Reviews of last semester materials• homework
AP Comp Sci exam schedule
• May 7, 2013, Tuesday• For more information on AP exam schedule
and fees, follow the link below:http://apcentral.collegeboard.com/apc/public/exam/calendar/index.html
• Section Itime – 1 hours and 15 minutesnumber of questions - 40percent of total grade – 50
• Section IItime – 1 hours and 45 minutesnumber of questions - 4percent of total grade – 50
Multiple choices•Number correct(out of 40) = _____________•¼ x number wrong = _____________•Raw score = line 1 – line 2 = ___________<=score 1
Free ResponseQuestion 1 _______________Question 2 _______________Question 3 _______________Question 4 _______________total ____ x 1.11 = ___________<=score 2
Score 1 + score 2 = final score(round to nearest whole number)
Equivalent AP gradeScore range AP grade60 - 80 545 - 59 433 – 44 325 – 32 2 0 – 24 1
Topics covered in the examI. Object-Oriented Program DesignII. Program ImplementationIII. Program AnalysisIV. Standard Data StructuresVI. Computing in Context
Exam strategies• Points are not deducted for incorrect answers => students are encouraged to answer all
multiple-choice• The AP Computer Science A Exam will include
several multiple choice questions based on the AP Computer Science Case Study
• Materials testable/not testable: Refer to “ap-computer-science-course-description.pdf”
file from my website under link downloads; Appendix A/B
Materials need to be covered for the test
• Representatins of numbers in different bases• Exceptions• String class + methods• Standard search: sequential vs binary• Standard sorts: selection, insertion and Merge
sort• Data structure:simple data type, classes, lists,
arrays• Standard algorithm- accessing array
(traversing, inserting, deleting an array)
IV. Standard Data StructuresData structures are used to represent information within a program. Abstraction is animportant theme in the development and application of data structures.A. Simple data types (int, boolean, double)B. ClassesC. ListsD. Arrays
V. Standard AlgorithmsA. Operations on data structures previously listed
1. Traversals2. Insertions3. Deletions
B. Searching1. Sequential2. Binary
C. Sorting1. Selection2. Insertion3. Mergesort
Reviews• Variable types – primitive vs reference• Strings• If/switch statement• methods• loop structures• Arrays• Classes/objects• GridWrold
Variable types• Primitive data types?• Reference data types?• Where do you put the data types?• What is the differences between these
two types?
Strings
• Strictly speaking, not a primitive type, although we can write a statement likeString aWord = “hello”;
• Concatenation operator +converts any non-String data to a String object before joining the strings
More about String class later in this semester
If/switch• if <condition> { <statement>; }• switch (choice) { case 1: <statement>; break;
case 4: …. }• switch (choice) { case ‘y’: <statement>; break;
case ‘n’: …. }
methods<access _ level> <return _ type> <name>(<parameters>)
{ <statements> }public double FromFarenheitToCelsius(double fTemp){
return (double)5/(double)9*(fTemp - 32);}
How to call methods in the main program?
Loop structure
• while loop• do while loop• for loop• Enhanced for loop
Arrays• 1 dimensional array
int [] intArry = new int[10];char[] charArry = new char[3];
Car[] carArry = new Car[2];• 2 dimensional array
int[][] intArry = new int[2][3]; char[][] charArry = new char[1][2];Car[][] carArry = new Car[3][2];
Class vs object• Class has property and behavior.
Property => state/instance variablesBehaviors => methods(accessor method,
mutator methods, helper methods)• Object is an instance of a class• “is-a” relationship: Inheritance; classes that
are derived from existing classes =>• “has-a” relationship: Classes that contains a
class member variable.
GridWorld
Actor Grid<interface>
ChameleonCritterBoxBug
CritterBugRockFlower
Location
UnboundedGridBoundedGrid
AbstractGrid
Homework• Preview BPJ 14, Barron’s P54-56• BPJ 35 Matrix Multiplication projectLevel 1 – put the 3 tables into 3 2-dimensional
arrays and use two for loops to print them out.Level 2 – level 1 work + contest type problems.Level 3 – write the whole project, but you don’t
need to write the class, just use main() to do everything; follow my algorithm mentioned in class to write the codes, otherwise you got only half score.
Matrix Multiplication• Look at Appendix AA
[ 1 2 -2 0] [-1 3 ] [-3 43] [-3 4 7 2] X [ 0 9 ] = [18 -60] [6 0 3 1 ] [ 1 -11] [ 1 -5 ]
[ 4 -5 ]1*(-1) + 2*0 + (-2) * 1 + 0 * 4 = -3c(0,0) = a(0,0) * b(0,0) + a(0,1) *b(1,0)+a(0,2)*b(2,0) +
a(0,3) * b(4,0)