Student Performance Q&A:

Similar documents
Student Performance Q&A:

AP Computer Science A 2004 Scoring Commentary

AP COMPUTER SCIENCE AB 2006 SCORING GUIDELINES

Student Performance Q&A:

Student Performance Q&A:

AP COMPUTER SCIENCE A 2010 GENERAL SCORING GUIDELINES

Chief Reader Report on Student Responses:

AP COMPUTER SCIENCE A 2006 SCORING GUIDELINES

STUDENT LESSON A20 Inheritance, Polymorphism, and Abstract Classes

AP Computer Science A

AP Computer Science A 2003 Scoring Guidelines

CO Java SE 8: Fundamentals

Student Performance Q&A:

AP Computer Science A

CompuScholar, Inc. 9th - 12th grades

JAVA MOCK TEST JAVA MOCK TEST II

Inheritance and Interfaces

AP Computer Science A

TeenCoder : Java Programming (ISBN )

Course materials Reges, Stuart, and Stepp, Martin. Building Java Programs: A Back to Basics Approach. 2d ed. (Boston: Addison-Wesley, 2011).

NJCCCS AREA: Mathematics. North Brunswick Township Public Schools AP COMPUTER SCIENCE. Acknowledgements. Vivian Morris, Mathematics Teacher

Curriculum Map Grade(s): Subject: AP Computer Science

College Board. AP CS A Labs Magpie, Elevens, and Picture Lab. New York: College Entrance Examination Board, 2013.

VIRTUAL FUNCTIONS Chapter 10

AP Computer Science A

Contents. I. Classes, Superclasses, and Subclasses. Topic 04 - Inheritance

BCS THE CHARTERED INSTITUTE FOR IT. BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT OBJECT ORIENTED PROGRAMMING

Spring 2018 El Camino College E. Ambrosio. Course Syllabus

AP Computer Science Summer Work Mrs. Kaelin


Reviewing for the Midterm Covers chapters 1 to 5, 7 to 9. Instructor: Scott Kristjanson CMPT 125/125 SFU Burnaby, Fall 2013

Introduction to Programming Using Java (98-388)

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix

IMACS: AP Computer Science A

AP Computer Science A Syllabus

Note that if both p1 and p2 are null, equals returns true.

Inheritance (Outsource: )

Object-Oriented Programming Paradigm

More About Objects and Methods

DOWNLOAD PDF CORE JAVA APTITUDE QUESTIONS AND ANSWERS

Course Text. Course Description. Course Objectives. StraighterLine Introduction to Programming in C++

Inheritance, Polymorphism, and Interfaces

AP Computer Science A

C++ Important Questions with Answers

Java for Programmers Course (equivalent to SL 275) 36 Contact Hours

CPS 506 Comparative Programming Languages. Programming Language

Boca Raton Community High School AP Computer Science A - Syllabus 2009/10

STUDENT LESSON A15 ArrayList

Language Features. 1. The primitive types int, double, and boolean are part of the AP

CS 61B, Midterm #3 and solutions, Spring 1996

Programming Language Concepts Object-Oriented Programming. Janyl Jumadinova 28 February, 2017

Chapter 5 Object-Oriented Programming

Object-Oriented Design (OOD) and C++

Polymorphism and Inheritance

Lecture 1: Overview & Intro to Java

Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub

CS61BL Summer 2013 Midterm 2

9/10/2018 Programming Data Structures Inheritance

CS445 Week 9: Lecture

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

INHERITANCE AND TYPE HIERARCHIES. Prof. Chris Jermaine

CSCI-142 Exam 1 Review September 25, 2016 Presented by the RIT Computer Science Community

Students received individual feedback throughout year on assignments.

Inheritance (Part 2) Notes Chapter 6

Fast Track to Core Java 8 Programming for OO Developers (TT2101-J8) Day(s): 3. Course Code: GK1965. Overview

Preface A Brief History Pilot Test Results

8. Polymorphism and Inheritance

Lecture 36: Cloning. Last time: Today: 1. Object 2. Polymorphism and abstract methods 3. Upcasting / downcasting

Programming II (CS300)

Java Primer 1: Types, Classes and Operators

(800) Toll Free (804) Fax Introduction to Java and Enterprise Java using Eclipse IDE Duration: 5 days

Objects and Iterators

CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17

EINDHOVEN UNIVERSITY OF TECHNOLOGY

Weiss Chapter 1 terminology (parenthesized numbers are page numbers)

CSE 331 Summer 2017 Final Exam. The exam is closed book and closed electronics. One page of notes is allowed.

BCS THE CHARTERED INSTITUTE FOR IT. BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT. Object Oriented Programming

AP Computer Science A (Java) Scope and Sequence

Absolute C++ Walter Savitch

ECE 122. Engineering Problem Solving with Java

SCourse Description. Includes important information regarding the introduction of the language Java. MAY 2004, MAY 2005

CS 1316 Exam 1 Summer 2009

AP Computer Science AB

Programming Exercise 14: Inheritance and Polymorphism

Subclass Gist Example: Chess Super Keyword Shadowing Overriding Why? L10 - Polymorphism and Abstract Classes The Four Principles of Object Oriented

Module 10 Inheritance, Virtual Functions, and Polymorphism

CS 251 Intermediate Programming Inheritance

Java Software Solutions for AP Computer Science 3rd Edition, Lewis et al. 2011

Advanced Programming - JAVA Lecture 4 OOP Concepts in JAVA PART II

CS61B (Clancy) Spring 1996 Exam 3, solutions, and grading standards. April 12, 1996 Exam 3

Arrays Classes & Methods, Inheritance

INHERITANCE & POLYMORPHISM. INTRODUCTION IB DP Computer science Standard Level ICS3U. INTRODUCTION IB DP Computer science Standard Level ICS3U

Bitwise Operators Objects and Methods

Introduction Welcome! Before you start Course Assessments The course at a glance How to pass M257

Inheritance & Polymorphism

Marine Biology Simulation Case Study

AP Computer Science A. Course Syllabus. Jackson County High School Instructor: LaDonna Woods School Year

Computer Programming II C++ (830)

Programming overview

CISC370: Inheritance

Transcription:

Student Performance Q&A: 2004 AP Computer Science A Free-Response Questions The following comments on the 2004 free-response questions for AP Computer Science A were written by the Chief Reader, Chris Nevison of Colgate University. They give an overview of each free-response question and of how students performed on the question, including typical student errors. General comments regarding the skills and content that students frequently have the most problems with are included. Some suggestions for improving student performance in these areas are also provided. Teachers are encouraged to attend a College Board workshop, to learn strategies for improving student performance in specific areas. General Comments The new exam introduced several new ideas. First, with Java as the programming language, an objectoriented approach to programming was expected. Most questions involved writing code within the context of class definitions for interacting objects. Students had to understand how to call methods for interacting objects from different classes. The use of methods is fundamental, so students were expected to call the appropriate method and not rewrite equivalent code. A new type of question involving the design of classes was introduced on this exam (question 2). Students needed to understand inheritance and polymorphism to answer these questions correctly. For full credit students had to create a good design that followed the specification given in the problem. Some general scoring principles are described on the General Usage sheet. Students were writing a draft solution under time constraints, so we did not penalize minor errors that did not reflect on the students understanding. For example, confusion about the use of length, length(), and size() for accessing the length of a String, array, or ArrayList was not penalized. Other errors on the usage sheet indicate penalties taken if the error was not covered specifically in the grading rubric. Some minor errors were not penalized because a newer version of the language (Java 1.5) that allows different syntax is now available. These non-penalized errors included failure to downcast when removing objects from an ArrayList and failure to correctly convert between primitive types and their wrapper classes (e.g., int and Integer).

Question 1 This question tested students understanding of simple algorithms on an ArrayList. Part (a) required a traversal through the list of String objects (words) to count the number with a given length. This Part tested a student s skill in looping through the structure, proper use of an if statement, and accumulation and return of the count. Part (b) asked students to search through the same ArrayList and remove those words with a given length. Since the structure was an ArrayList that re-indexes and resizes when an element is removed, this Part required recognition of the need to avoid skipping an element when the preceding element is removed. It also tested the loop and if logic. A surprising number of students (2,500 out of 13,800) did not answer or scored zero on this, the first (and easiest) question on the exam. This probably indicates a large number of students were not prepared for working with ArrayLists or were just not prepared for working with classes in Java. Those students who did respond did quite well on this question. They showed an understanding of the fundamental control logic of loops and conditionals, as well as an understanding of the use of String objects. The mean score was 5.8 out of 9. Students often confused the ArrayList structure with an array, using array notation mylist[k] instead of the correct mylist.get(k). Students also left out the needed downcast when getting an object from the ArrayList; however, this error was not penalized. Common logic errors included offby-one bugs on the loop logic; reversed conditions in the conditional logic; and failure to declare, initialize, increment, or return a variable for counting. In Part (b) a common error was to use a for loop to iterate through the array without realizing that when an item is removed from an ArrayList, the structure is resized and elements after the element that was removed are re-indexed. Consequently, when two items in a row had the required length, the second would be skipped in the loop and never removed. Continue to teach simple algorithms that process information stored in array structures. Demonstrate the use of both arrays and the library structure ArrayList, including the differences in syntax for access and the resizing logic for an ArrayList. Students should understand the common process of correctly removing elements from an ArrayList. Question 2 This question called for the design of classes within a given inheritance hierarchy. It was very similar to the sample problem about bank accounts in the course description. Students were expected to understand how a subclass inherits methods from a superclass so that they do not need to be redefined. The question also called for the definition of a method in a subclass that was specified as abstract in the superclass. Students needed to know how to access a superclass version of a method within the redefinition of the same method in the subclass using super. They also needed to know how to invoke the constructor from the superclass using super. Finally, students had to know how to use the polymorphism defined

in the various subclasses in a client method that processes objects of the superclass type, Pet. Most students attempted this problem (there were only 750 no-responses and zeroes). Since it provided a template from which one could infer much of a solution for Part (a) and some for Part (b), most students got some points. However, the results were spread across the nine-point range, indicating a range of understanding of how to define a class, especially a subclass of a given abstract class. The mean score was 5.2 out of 9. The most common misunderstanding was how to access information from the superclass within the definition of a method in a subclass. Many students did not understand 1) how to use super to invoke the super class constructor to set the instance variables declared in the superclass or 2) how to use super to invoke a method from the super class, as required in the LoudDog speak method which needed to invoke super.speak(). When students did not access the superclass methods properly, they would attempt to access the private instance variables inherited from the superclass a major error. Some students would redefine the instance variables (for example, myname) in the subclass, setting its value in the constructor and using it in an override of the method getname. Even if this gives the appearance of correct function, it makes the inheritance hierarchy fragile in that changes in the superclass will not be propagated. Students who made this error did not understand how the subclass inherits methods from the superclass, meaning they should not be defined in the subclass, and how the superclass constructor must be invoked to set values for private instance variables declared in the superclass. Weaker students missed points on Part (c) by incorrectly accessing the elements of the ArrayList (using array notation) or for not understanding the polymorphism and trying to work around it. Inheritance and polymorphism are new and important topics for object-oriented programming. They are implemented in a relatively straightforward way in Java, but many students seem not to have learned the proper use of these tools. Teachers must show how to define subclasses within an inheritance hierarchy and what should and should not be defined in subclasses. Students should understand how to extend an abstract class. (On future exams they may be required to implement an interface.) Teachers must also demonstrate the use of polymorphism for example, for the speak method in this problem. Question 3 This question was based on the Marine Biology Simulation case study. It tested students abilities to add new functionality within the context of a large program that they have studied. This new functionality was defined by a new class, PondStocker, which could be used in a redefined Simulation class (not part of the problem). Students had to understand the relationships among the existing classes in the simulation and how to use these classes in defining the methods of the new class. One method involved implementing a mathematical calculation, a second the use of random numbers, and a third the application of these two to changing the content of the environment in the simulation model.

In the past, a significant number of students did not attempt the case study question, indicating that they hadn t studied it adequately in their school course. This year there were fewer no-response and zero scores on this question than on either question 1 or 4, indicating that only those students who were poorly prepared for the exam did not attempt the question. It seems that teachers are teaching the case study much better than they did in the past. Very few students got full credit for this problem, because there were a couple of half-point deductions that were quite common. However, the distribution of scores across the remaining range of scores was quite even, indicating that students otherwise performed well. The mean score was 4.0 out of 9. Part (a) of this question called for the calculation of the minimum number of fish that makes the density greater than a given value. A calculation must be done as a double, truncated and one added. Students found many ways to do this and often lost the half point for missing the correct rounding adjustment or other points in this computation. Part (b) of the question called for the return of a random location from the environment. Students often did not use the RandNumGenerator.getInstance method to create the needed instance of Random (the purpose of this was explained in the case study). This showed that some understanding of the case study was needed. Students often attempted to use a method from the Random class without creating an instance of Random. In addition, some students misinterpreted the intent of this method, returning a random empty location, which is not in the specification (the check for empty belongs in the method defined in Part (c)). Students need to carefully read the specification for each method. Part (c) called for the correct number of fish to be added to empty locations. Students often forgot to check whether a location was empty, sometimes got the syntax of accessing the environment incorrect, and often made the error of adding a fish twice. Because the Fish constructors add the fish to the environment, it is an error to construct a fish and then add that fish to the environment. Teach the case study thoroughly (most teachers are doing this). Include examples of exercises like those given in the case study involving modification of the Fish class or the definition of subclasses of Fish, as well as examples that involve the definition of a new class that adds functionality, as called for in this problem. Be sure that students understand how to make use of the methods of classes given in the case study in this context. Question 4 This question tested students abilities to implement a relatively complicated algorithm. It used an array as the data structure, so students needed to know how to work with an array as opposed to the ArrayList used in question 1. Part (a) tested students understanding of Boolean expressions and methods. This was the most difficult question on the exam, with more students with no-response and zero scores

(3,250) and many scores of 1 (1,100). Among other students the results were good, with more scores in the 6 to 9 range than in the lower range. The mean score was 4.4 out of 9. In Part (a) students would sometimes be off by one when checking the high end of the array or would only check position and not direction. In Part (b) students often mixed the logic of the conditionals. For example, they would not check for the tile being empty after removing an item, or they would change direction and location on the same move. There were several variations on how this logic can be incorrect. In Part (c) students would sometimes reproduce code to check that the hall was clear. Although this can work out correctly, students would lose points for reproducing code when a simple call to the hallisclear method is the correct way to check. Show students how to work with Booleans and boolean methods. Teach students to implement complex algorithms from a given specification. Perhaps most important, emphasize that students should not reproduce code for a method with the same functionality that is already given even though such code may work, it is poor programming practice.