| |
| |
Acknowledgments | |
| |
| |
Introduction | |
| |
| |
| |
About the AP Computer Science A and AB Exams | |
| |
| |
What Is the Advanced Placement Program? | |
| |
| |
How Your Exam Results Are Used by Colleges | |
| |
| |
Registering for the Exam | |
| |
| |
Students with Disabilities | |
| |
| |
What to Bring to the Exam | |
| |
| |
What Not to Bring | |
| |
| |
Cheaters Never Prosper | |
| |
| |
How to Get More Information | |
| |
| |
What Is Covered on the AP Computer Science A and AB Exams? What's the Difference? | |
| |
| |
How the Exam Is Scored | |
| |
| |
Test-Taking Strategies | |
| |
| |
| |
Java Fundamentals | |
| |
| |
Introduction | |
| |
| |
Getting Started | |
| |
| |
Code Format | |
| |
| |
Input and Output | |
| |
| |
Variables | |
| |
| |
Operators | |
| |
| |
Evaluating Boolean Expressions | |
| |
| |
Control Structures | |
| |
| |
Synopsis | |
| |
| |
Review Questions | |
| |
| |
| |
Designing, Testing, and Performance | |
| |
| |
Introduction | |
| |
| |
Designing a Program | |
| |
| |
Problem Identification | |
| |
| |
Top-Down Design | |
| |
| |
Object-Oriented Design | |
| |
| |
Implementation | |
| |
| |
Testing a Program | |
| |
| |
Types of Errors | |
| |
| |
Assertions | |
| |
| |
Preconditions | |
| |
| |
Postconditions | |
| |
| |
Boundary Test | |
| |
| |
Debugging Techniques | |
| |
| |
Unit Testing | |
| |
| |
Integration Testing | |
| |
| |
Measuring Performance | |
| |
| |
Big-Oh Notation (AB Only) | |
| |
| |
Worst-case Analysis | |
| |
| |
Average-case Analysis | |
| |
| |
Best-case Analysis | |
| |
| |
Deciding Which Case Applies | |
| |
| |
Review Questions (AB Only) | |
| |
| |
| |
Object-Oriented Design and Programming | |
| |
| |
Introduction | |
| |
| |
Classes | |
| |
| |
Objects | |
| |
| |
Attributes and Methods | |
| |
| |
Access Modifiers | |
| |
| |
Method Overloading | |
| |
| |
Exceptions (AB Only) | |
| |
| |
Constructors | |
| |
| |
Encapsulation and Information Hiding | |
| |
| |
Abstract Classes | |
| |
| |
Interfaces | |
| |
| |
Inheritance | |
| |
| |
Extending a Class | |
| |
| |
HAS-A and IS-A Relationships | |
| |
| |
Method Overriding | |
| |
| |
Polymorphism | |
| |
| |
Casting | |
| |
| |
Review Questions | |
| |
| |
| |
Java Library Classes | |
| |
| |
Introduction | |
| |
| |
The Object Class | |
| |
| |
The String Class | |
| |
| |
The Math Class | |
| |
| |
The Random Class | |
| |
| |
The Comparable Interface | |
| |
| |
The Integer Class | |
| |
| |
The Double Class | |
| |
| |
Review Questions | |
| |
| |
| |
Recursion | |
| |
| |
Introduction | |
| |
| |
Understanding Recursion | |
| |
| |
Writing a Recursive Method | |
| |
| |
When to Use Recursion | |
| |
| |
Tracing a Call to a Recursive Method | |
| |
| |
Recursively Traversing Arrays | |
| |
| |
Recursion and Program Performance | |
| |
| |
Review Questions | |
| |
| |
| |
Arrays and the ArrayList Class | |
| |
| |
Introduction | |
| |
| |
Arrays | |
| |
| |
The ArrayList Class | |
| |
| |
Summary: Arrays vs. ArrayLists | |
| |
| |
Review Questions | |
| |
| |
| |
Advanced Collection Classes (AB Only) | |
| |
| |
Introduction | |
| |
| |
The LinkedList Class | |
| |
| |
The List Interface | |
| |
| |
The Iterator Interface | |
| |
| |
The Listlterator Interface | |
| |
| |
The Set Interface | |
| |
| |
HashSet and TreeSet Classes | |
| |
| |
The Map Interface | |
| |
| |
HashMap and TreeMap Classes | |
| |
| |
Review Questions | |
| |
| |
| |
Data Structures (AB Only) | |
| |
| |
Introduction | |
| |
| |
Linked Lists | |
| |
| |
Stacks | |
| |
| |
Queues | |
| |
| |
Priority Queues | |
| |
| |
Trees | |
| |
| |
Inserting (Code Sample) | |
| |
| |
Hashtable | |
| |
| |
Review Questions | |
| |
| |
| |
Searching and Sorting Algorithms | |
| |
| |
Introduction | |
| |
| |
Sequential Search | |
| |
| |
Binary Search | |
| |
| |
Sorting | |
| |
| |
Selection Sort | |
| |
| |
Insertion Sort | |
| |
| |
Mergesort | |
| |
| |
Quicksort (AB Only) | |
| |
| |
Heapsort (AB Only) | |
| |
| |
Summary | |
| |
| |
Review Questions | |
| |
| |
| |
Solutions to Chapter Review Questions | |
| |
| |
| |
The Marine Biology Simulation Case Study | |
| |
| |
Introduction | |
| |
| |
Overview | |
| |
| |
Utility Classes and Interfaces | |
| |
| |
Core Classes and Interfaces | |
| |
| |
Data Files | |
| |
| |
Types of Questions | |
| |
| |
Source Code | |
| |
| |
| |
The Princeton Review AP Computer Science A Practice Test | |
| |
| |
| |
Answers and Explanations to the Practice Test | |
| |
| |
| |
The Princeton Review AP Computer Science AB Practice Test | |
| |
| |
| |
Answers and Explanations to the Practice Test | |
| |
| |
| |
GNU License Agreement | |
| |
| |
Index | |
| |
| |
About the Authors | |