AP Computer Science A

advertisement
AP Computer Science A – Semester 1 Exam Review Topics
Semester 1 Exam will consist of at least 50 multiple choice questions and possibly two
free response questions.
Quarter 1 Topics:

Classes, objects, methods (from Karel Ch2 lectures)
o Know that objects are typically nouns and methods are typically verbs
o Classes are descriptions of objects of the same kind
o Know the difference between an object class and a driver (tester) class
o Coding conventions for classes, methods, variables
o Error classification (lexical, syntax, execution, intent)

Inheritance (from Karel Ch3 lectures)
o Know what a subclass and superclass are
o Know how to invoke a superclass constructor
o Know how to execute a method from the superclass that has the same name as
a method in the subclass
o What is Stepwise Refinement?
o Know how to use is-A terminology

Polymorphism (from Karel Ch4 lectures)
o What is polymorphism?
o Know how to construct a new object ( i.e. Student stu = new Student(“Tim”,
90); )
o How can you get a NullPointerException error?
o What is an abstract class and an abstract method?
o What is abstraction?
o Know the following terms: initialize, assignment, null, parameter

Conditional Statements (from Karel Ch5 lectures)
o Know how to use if/else statements
o Know how to use boolean operators ( &&, ||, ! )
o Know how to simplify if/else statements (bottom factoring, top factoring)
o Know how to use DeMorgan’s Law to negate a condition

Loops (from Karel Ch6 lectures)
o Know how to use and when to use for loops
o Know how to use and when to use while loops
o Be able to identify an infinite loop
o Know the 4 steps for building a while loop

Hardware/Software (from Java Concepts – Hardware/Software lectures)
o Know how hardware terminology (CPU, primary/secondary storage, I/O.
motherboard, bus, network
o Know the process for developing/compiling/executing a Java program (editor,
compiler, JVM, bytecode, source code, etc.)
o Know the different types of Java comments

Using Objects (from Java Concepts Using Objects lectures)
o Know the data types (primitive, objects, and Strings)
o Know how to name identifiers (name of variable, method, or class)
o Know how to declare and initialize variables and objects
o Know what a constant is and its naming convention
o Know how to assign something to a variable
o Recognize the Scanner class and how it is used

Java Basics Arithmetic (from Java Concepts Using Objects lectures)
o Know the precedence of arithmetic operators
o Know the results of using division with integers or floating point numbers
o What is mixed mode arithmetic?
o How do you perform modulus (%) arithmetic?
o Know how to use casting to convert an integer to a double or double to integer
o Know how to use concatenation and the rules for concatenating strings and
numbers
Quarter 2 Topics (same as Quarter 2 Test review topics):

Arithmetic operations (from Java Basics lectures)
o Know how to use extended assignment operators
o How do you decrement and increment variables (i++, i--;)
o Know how integers and floating point numbers react when using division

Math class (from Java Basics lectures)
o Know how to use the following methods from the Math class:
 Math.abs(-30);
 Math.pow(-3, 3);
 Math.random();

Random class (from Java Basics lectures)
o How do you use this class to generate random numbers?

Relational operators (from Java Basics lectures)
o When do you use relational operators?
o Relational operators (>, >=, <, <=, = =, !=)

Use of a sentinel (from Java Basics lectures)
o What is the purpose of a sentinel value and when is it used?
o break statement

String methods (from Strings lectures)
o How do you concatenate variables?
o Know how to use the following String methods:
 int length()
 String substring(int start, int pastEnd)
 String substring(int start)
 int indexOf(String otherString)
 boolean equals(String otherString)
 int compareTo(String otherString)
o Sorting strings (SNUL)

Arrays (from Arrays lectures)
o Know what an array and element/index/subscript is
o Know how to instantiate an array: int[] abc = new int[10];
o Know how to refer to an array element: abc[0] or abc[i] , etc.
o How do you get the length of an array? abc.length
o What is an ArrayIndexOutOfBoundsException ?
o What is an enhanced for loop and what are its limitations/advantages?

Know how to use an enhanced for loop:
for ( int element : abc )
o What is an NullPointerException ?
o What is an initializer list? int[] abc = {1,2,3,4,5};
o How to add a new object (i.e. Student) to an array

Array lists (from ArrayLists lectures)
o How is an ArrayList different than an array?
o Know how to declare and instantiate an ArrayList:
 ArrayList<String> list = new ArrayList<String>();
 ArrayList<Integer> list = new ArrayList<Integer>(); etc.
o Know how to use ArrayList methods:
 int size()
 Object get(int index)
 Object set(int index, Object obj)
 void add(int index, Object obj)
 Object remove(int index)
 void clear()
o Know how to use ArrayLists with user classes
o Collections class:
 void sort(ArrayList list)
 int binarySearch(ArrayList list, Object obj)
 void reverse(ArrayList(list)
 void rotate(ArrayList list, int dir)
 void fill(ArrayList list, Object obj)

Other OOP Topics
o Know what instance variables are
o Know how to identify constructors and what they do
 Same name as class
 Initializes the instance variables
Download