AP Computer Science
Encyclopedia
Advanced Placement Computer Science (also called AP Comp Sci, APCS or AP Java) is the name of two distinct Advanced Placement courses and examinations offered by the College Board
College Board
The College Board is a membership association in the United States that was formed in 1900 as the College Entrance Examination Board . It is composed of more than 5,900 schools, colleges, universities and other educational organizations. It sells standardized tests used by academically oriented...

 to high school
High school
High school is a term used in parts of the English speaking world to describe institutions which provide all or part of secondary education. The term is often incorporated into the name of such institutions....

 students as an opportunity to earn college credit for a college
College
A college is an educational institution or a constituent part of an educational institution. Usage varies in English-speaking nations...

-level computer science
Computer science
Computer science or computing science is the study of the theoretical foundations of information and computation and of practical techniques for their implementation and application in computer systems...

 course. AP Computer Science A is meant to be the equivalent of a first-semester course in computer science, while AP Computer Science AB equates to a full year. The AP exam currently tests students on their knowledge of Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

. AP Computer Science AB was discontinued following the May 2009 exam administration. The current Chief Reader for AP Computer Science (2008–2012) is Dr. Jody Paul, Associate Professor of Computer Science at Metropolitan State College of Denver
Metropolitan State College of Denver
The Metropolitan State College of Denver is a four-year college and now offers certain Graduate programs located in Denver, Colorado, United States. As of 2009, Metro State had the second-largest enrollment of undergraduates of any college in Colorado...

.

AP Computer Science A

Advanced Placement Computer Science A emphasizes object-oriented programming
Object-oriented programming
Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...

 methodology with an emphasis on problem solving and algorithm
Algorithm
In mathematics and computer science, an algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function. Algorithms are used for calculation, data processing, and automated reasoning...

 development. It also includes the study of data structures and abstraction, but these topics are not covered to the extent that they are covered in AP Computer Science AB.

AP Computer Science AB (Discontinued)

Advanced Placement Computer Science AB included all the topics of AP Computer Science A, as well as a more formal and a more in-depth study of algorithms, data structures, and data abstraction. For example, binary trees were studied in AP Computer Science AB but not in AP Computer Science A. The use of recursive
Recursion (computer science)
Recursion in computer science is a method where the solution to a problem depends on solutions to smaller instances of the same problem. The approach can be applied to many types of problems, and is one of the central ideas of computer science....

 data structures and dynamically allocated structures was fundamental to AP Computer Science AB. Due to low numbers of students taking AP Computer Science AB, it was discontinued after the 2008-2009 year.

Topic Outline

  • Object-Oriented Program Design
    Object-oriented analysis and design
    Object-oriented analysis and design is a software engineering approach that models a system as a group of interacting objects. Each object represents some entity of interest in the system being modeled, and is characterised by its class, its state , and its behavior...

    • Problem Design
      • Read and understand a problem's description, purpose, and goals.
      • Specify the purpose and goals for a problem. (AB only)
      • Apply data abstraction
        Abstract data type
        In computing, an abstract data type is a mathematical model for a certain class of data structures that have similar behavior; or for certain data types of one or more programming languages that have similar semantics...

         and encapsulation.
      • Read and understand class specifications and relationships among the classes ("is-a
        Is-a
        In knowledge representation, object-oriented programming and design, is-a or is_a or is a is a relationship where one class D is a subclass of another class B ....

        ", "has-a
        Has-a
        In database design and object oriented program architecture, has-a is a relationship where one object "belongs" to another object , and behaves according to the rules of ownership. In simple words, has-a relationship in an object is called a member field of an object...

        " relationships).
      • Decompose a problem into classes, define relationships and responsibilities of those classes. (AB only)
      • Understand and implement a given class hierarchy.
      • Identify reusable components from existing code using classes and class libraries.
    • Class Design
      • Design and implement a class.
      • Design and implement a set of interacting classes. (AB only)
      • Design an interface.
      • Choose appropriate data representation and algorithms.
      • Choose appropriate advanced data structures and algorithms. (AB only)
      • Apply functional decomposition.
      • Extend a given class using inheritance.
  • Program Implementation
    Implementation
    Implementation is the realization of an application, or execution of a plan, idea, model, design, specification, standard, algorithm, or policy.-Computer Science:...

    • Implementation techniques
      • Methodology
        • Object-oriented
          Object-oriented programming
          Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...

           development
        • Top-down development
          Top-down and bottom-up design
          Top–down and bottom–up are strategies of information processing and knowledge ordering, mostly involving software, but also other humanistic and scientific theories . In practice, they can be seen as a style of thinking and teaching...

        • Encapsulation and information holding
        • Procedural abstraction
          Abstraction (computer science)
          In computer science, abstraction is the process by which data and programs are defined with a representation similar to its pictorial meaning as rooted in the more complex realm of human life and language with their higher need of summarization and categorization , while hiding away the...

    • Programming constructs
      • Primitive types vs. objects
        Object (computer science)
        In computer science, an object is any entity that can be manipulated by the commands of a programming language, such as a value, variable, function, or data structure...

      • Declaration
        Declaration (computer science)
        In programming languages, a declaration specifies the identifier, type, and other aspects of language elements such as variables and functions. It is used to announce the existence of the element to the compiler; this is important in many strongly-typed languages that require variables and their...

        • Constant declarations
        • Variable
          Variable (programming)
          In computer programming, a variable is a symbolic name given to some known or unknown quantity or information, for the purpose of allowing the name to be used independently of the information it represents...

           declarations
        • Class
          Class (computer science)
          In object-oriented programming, a class is a construct that is used as a blueprint to create instances of itself – referred to as class instances, class objects, instance objects or simply objects. A class defines constituent members which enable these class instances to have state and behavior...

           declarations
        • Interface
          Interface (computer science)
          In the field of computer science, an interface is a tool and concept that refers to a point of interaction between components, and is applicable at the level of both hardware and software...

           declarations
        • Method
          Method (computer science)
          In object-oriented programming, a method is a subroutine associated with a class. Methods define the behavior to be exhibited by instances of the associated class at program run time...

           declarations
        • Parameter
          Parameter (computer science)
          In computer programming, a parameter is a special kind of variable, used in a subroutine to refer to one of the pieces of data provided as input to the subroutine. These pieces of data are called arguments...

           declarations
      • Console
        System console
        The system console, root console or simply console is the text entry and display device for system administration messages, particularly those from the BIOS or boot loader, the kernel, from the init system and from the system logger...

         output
        Output
        Output is the term denoting either an exit or changes which exit a system and which activate/modify a process. It is an abstract concept, used in the modeling, system design and system exploitation.-In control theory:...

         (System.out.print/println)
      • Control
        Control flow
        In computer science, control flow refers to the order in which the individual statements, instructions, or function calls of an imperative or a declarative program are executed or evaluated....

        • Methods
        • Sequential
        • Conditional
          Conditional statement
          In computer science, conditional statements, conditional expressions and conditional constructs are features of a programming language which perform different computations or actions depending on whether a programmer-specified boolean condition evaluates to true or false...

        • Iterations
        • Recursion
          Recursion
          Recursion is the process of repeating items in a self-similar way. For instance, when the surfaces of two mirrors are exactly parallel with each other the nested images that occur are a form of infinite recursion. The term has a variety of meanings specific to a variety of disciplines ranging from...

    • Java library classes (included in the A or AB-level AP Java Subset)
  • Program Analysis
    • Testing
      Software testing
      Software testing is an investigation conducted to provide stakeholders with information about the quality of the product or service under test. Software testing can also provide an objective, independent view of the software to allow the business to appreciate and understand the risks of software...

      • Test classes and libraries in isolation
      • Identify boundary cases and generate appropriate test data
      • Perform integration testing
    • Debugging
      Debugging
      Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware, thus making it behave as expected. Debugging tends to be harder when various subsystems are tightly coupled, as changes in one may cause bugs to emerge...

      • Categorize errors: compile time
        Syntax error
        In computer science, a syntax error refers to an error in the syntax of a sequence of characters or tokens that is intended to be written in a particular programming language....

        , runtime, logic
        Logic error
        In computer programming, a logic error is a bug in a program that causes it to operate incorrectly, but not to terminate abnormally . A logic error produces unintended or undesired output or other behavior, although it may not immediately be recognized as such.Logic errors occur in both compiled...

      • Identify and correct errors
      • Techniques: use a debugger, add extra output statements, hand-trace code
    • Understand and modify existing code
    • Extend existing code using inheritance
    • Understand error handling
      Exception handling
      Exception handling is a programming language construct or computer hardware mechanism designed to handle the occurrence of exceptions, special conditions that change the normal flow of program execution....

      • Understand runtime exceptions
      • Throw runtime exceptions (AB only)
    • Reason about programs
      • Precondition
        Precondition
        In computer programming, a precondition is a condition or predicate that must always be true just prior to the execution of some section of code or before an operation in a formal specification....

        s and postcondition
        Postcondition
        In computer programming, a postcondition is a condition or predicate that must always be true just after the execution of some section of code or after an operation in a formal specification. Postconditions are sometimes tested using assertions within the code itself...

        s
      • Assertions
        Assertion (computing)
        In computer programming, an assertion is a predicate placed in a program to indicate that the developer thinks that the predicate is always true at that place.For example, the following code contains two assertions:...

      • Invariants
        Invariant (computer science)
        In computer science, a predicate is called an invariant to a sequence of operations provided that: if the predicate is true before starting the sequence, then it is true at the end of the sequence.-Use:...

         (AB only)
    • Analysis of algorithms
      • Informal comparisons of running times
      • Exact calculation of statement execution counts
      • Big-O notation (AB only)
      • Worst-case and average-case
        Best, worst and average case
        In computer science, best, worst and average cases of a given algorithm express what the resource usage is at least, at most and on average, respectively...

         time and space analysis
        Information space analysis
        Information space analysis is a deterministic method, enhanced by machine intelligence, for locating and assessing resources for team centric efforts....

         (AB only)
    • Numerical representations and limits
      • Representations of numbers in different bases
        Radix
        In mathematical numeral systems, the base or radix for the simplest case is the number of unique digits, including zero, that a positional numeral system uses to represent numbers. For example, for the decimal system the radix is ten, because it uses the ten digits from 0 through 9.In any numeral...

      • Limitations of finite representations (e.g., integer
        Integer
        The integers are formed by the natural numbers together with the negatives of the non-zero natural numbers .They are known as Positive and Negative Integers respectively...

         bounds, imprecision of floating-point representations, and round-off error
        Round-off error
        A round-off error, also called rounding error, is the difference between the calculated approximation of a number and its exact mathematical value. Numerical analysis specifically tries to estimate this error when using approximation equations and/or algorithms, especially when using finitely many...

        )
  • Standard Data Structures
    • Simple data types (int
      Integer (computer science)
      In computer science, an integer is a datum of integral data type, a data type which represents some finite subset of the mathematical integers. Integral data types may be of different sizes and may or may not be allowed to contain negative values....

      , boolean, double
      Double precision
      In computing, double precision is a computer number format that occupies two adjacent storage locations in computer memory. A double-precision number, sometimes simply called a double, may be defined to be an integer, fixed point, or floating point .Modern computers with 32-bit storage locations...

      )
    • Classes
      Class (computer science)
      In object-oriented programming, a class is a construct that is used as a blueprint to create instances of itself – referred to as class instances, class objects, instance objects or simply objects. A class defines constituent members which enable these class instances to have state and behavior...

    • One-dimensional arrays
    • Two-dimensional arrays (AB only)
    • Linked lists (singly, doubly, circular) (AB only)
    • Stacks
      Stack (data structure)
      In computer science, a stack is a last in, first out abstract data type and linear data structure. A stack can have any abstract data type as an element, but is characterized by only three fundamental operations: push, pop and stack top. The push operation adds a new item to the top of the stack,...

       (AB only)
    • Queues (AB only)
    • Trees
      Tree (data structure)
      In computer science, a tree is a widely-used data structure that emulates a hierarchical tree structure with a set of linked nodes.Mathematically, it is an ordered directed tree, more specifically an arborescence: an acyclic connected graph where each node has zero or more children nodes and at...

       (AB only)
    • Heaps
      Heap (data structure)
      In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if B is a child node of A, then key ≥ key. This implies that an element with the greatest key is always in the root node, and so such a heap is sometimes called a max-heap...

       (AB only)
    • Priority queues (AB only)
    • Sets
      Set (computer science)
      In computer science, a set is an abstract data structure that can store certain values, without any particular order, and no repeated values. It is a computer implementation of the mathematical concept of a finite set...

       (AB only)
    • Maps
      Associative array
      In computer science, an associative array is an abstract data type composed of a collection of pairs, such that each possible key appears at most once in the collection....

       (AB only)
  • Standard Algorithms
    • Operations on data structures listed above
      • Traversals
      • Insertions
      • Deletions
      • Iterators (AB only)
    • Searching
      Search algorithm
      In computer science, a search algorithm is an algorithm for finding an item with specified properties among a collection of items. The items may be stored individually as records in a database; or may be elements of a search space defined by a mathematical formula or procedure, such as the roots...

      • Sequential
        Linear search
        In computer science, linear search or sequential search is a method for finding a particular value in a list, that consists of checking every one of its elements, one at a time and in sequence, until the desired one is found....

      • Binary
        Binary search algorithm
        In computer science, a binary search or half-interval search algorithm finds the position of a specified value within a sorted array. At each stage, the algorithm compares the input key value with the key value of the middle element of the array. If the keys match, then a matching element has been...

      • Hashing
        Hash function
        A hash function is any algorithm or subroutine that maps large data sets to smaller data sets, called keys. For example, a single integer can serve as an index to an array...

         (AB only)
    • Sorting
      Sorting algorithm
      In computer science, a sorting algorithm is an algorithm that puts elements of a list in a certain order. The most-used orders are numerical order and lexicographical order...

      • Selection
        Selection sort
        Selection sort is a sorting algorithm, specifically an in-place comparison sort. It has O time complexity, making it inefficient on large lists, and generally performs worse than the similar insertion sort...

      • Insertion
        Insertion sort
        Insertion sort is a simple sorting algorithm: a comparison sort in which the sorted array is built one entry at a time. It is much less efficient on large lists than more advanced algorithms such as quicksort, heapsort, or merge sort...

      • Mergesort
      • Quicksort (AB only)
      • Heapsort
        Heapsort
        Heapsort is a comparison-based sorting algorithm to create a sorted array , and is part of the selection sort family. Although somewhat slower in practice on most machines than a well implemented quicksort, it has the advantage of a more favorable worst-case O runtime...

         (AB only)
  • Computing in Context
    • Major hardware components
      • Primary and secondary memory
      • Processors
      • Peripherals
    • System software
      • Language translators/compilers
      • Virtual machines
      • Operating systems
    • Types of systems
      • Single-user systems
      • Networks
    • Responsible use of computer systems
      • System reliability
      • Privacy
      • Legal issues and intellectual property
        Intellectual property
        Intellectual property is a term referring to a number of distinct types of creations of the mind for which a set of exclusive rights are recognized—and the corresponding fields of law...

      • Social and ethical ramifications of computer use

AP Computer Science exam

The AP exam currently tests students on their knowledge of computer science through Java
Java (Sun)
Java refers to several computer software products and specifications from Sun Microsystems, a subsidiary of Oracle Corporation, that together provide a system for developing application software and deploying it in a cross-platform environment...

. Before 1999, the AP exam tested students on their knowledge of Pascal. From 1999 to 2003, the exam tested students on their knowledge of C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

 instead. The AP exam in Computer Science was first offered in 1984.

The exam is composed of two sections:
  • Section I: Multiple Choice [1 hour and 15 minutes for 40 multiple-choice questions]
  • Section II: Free-Response [1 hour and 45 minutes for 4 problems involving extended reasoning]

Case Studies

The AP exam has used several programs in its free-response section to test student's knowledge of object-oriented programs without requiring them to develop an entire environment. Currently, the test uses the GridWorld case study.

GridWorld Case Study

The GridWorld
GridWorld
GridWorld is a computer program case study written in Java for use with the AP Computer Science program. It serves as an example of object-oriented programming embedded in a more complicated design project than most students have worked with before...

 Case Study is intended to be a substitute for writing a single large program as a culminating project. Due to obvious time restraints during the exam, the GridWorld Case Study is provided by the College Board http://apcentral.collegeboard.com/apc/public/repository/GridWorldCode.zip to students prior to the exam. They are expected to be familiar with the classes and interfaces (and how they interact) before taking the exam. The case study is divided into five sections, the last of which is only tested on the AB exam.

Roughly five multiple-choice questions in Sections I are devoted to the GridWorld Case Study, and it is the topic of one free response question in Section II.

The GridWorld Case Study replaced the Marine Biology Case Study for the 2007-2008 school year.

Marine Biology Case Study

The Marine Biology Simulation Case Study (MBCS) was a program written in Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

 for use with the A and AB examinations. It served as an example of object-oriented programming
Object-oriented programming
Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...

 (OOP) embedded in a more complicated design project than most students had worked with before. It replaced the Big Integer case study that was in use prior to 2000.

The case study was designed to allow the College Board
College Board
The College Board is a membership association in the United States that was formed in 1900 as the College Entrance Examination Board . It is composed of more than 5,900 schools, colleges, universities and other educational organizations. It sells standardized tests used by academically oriented...

 to quickly test a student's knowledge of object oriented programming ideas such as inheritance
Inheritance (computer science)
In object-oriented programming , inheritance is a way to reuse code of existing objects, establish a subtype from an existing object, or both, depending upon programming language support...

 and encapsulation while requiring students to understand how objects such as "the environment", "the fish", and the simulation's control module interact with each other without having to develop the entire environment independently, which would be quite time consuming. The case study also gives all students taking the AP Computer Science exams with a common experience from which to draw additional test questions.

On each of the exams, at least one free-response question was derived from the case study. There were also five multiple-choice questions that are derived from the case study.

This case study was discontinued from 2007, and was replaced by GridWorld
GridWorld
GridWorld is a computer program case study written in Java for use with the AP Computer Science program. It serves as an example of object-oriented programming embedded in a more complicated design project than most students have worked with before...

.

Grade distributions for AP Computer Science A

In the 2010 administration, 20,120 students took the exam. The mean score was a 3.15. The grade distribution for 2010 was:
Score Percent
5 26.3%
4 24.7%
3 13.9%
2 7.9%
1 27.1%

Grade distributions for AP Computer Science AB

In the 2008 administration, 4,995 students took the exam. The mean score was a 3.52. The grade distribution for 2008 was:
Score Percent
5 38.9%
4 19.1%
3 15.1%
2 9.0%
1 18.0%

AP Computer Science: Principles

A new exam, titled Advanced Placement Computer Science: Principles is currently under development. It is designed not to be a replacement for AP Computer Science A, but rather as a parallel option that will focus on computational thinking and fluency. The project is being led by Prof. Owen Astrachan, Professor of the Practice of Computer Science at Duke University. Pilot materials are currently being created, with pilot studies planned to run from the end of 2010 through 2012. .

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK