AP COMPUTER SCIENCE A 2009 SCORING GUIDELINES

Similar documents
AP COMPUTER SCIENCE A 2008 SCORING GUIDELINES

AP Computer Science A 2008 Scoring Guidelines

Student Performance Q&A:

Ant Farm GridWorld Project

GRIDWORLD OVERVIEW CHRIS THIEL, OFMCAP SFHS APCS 2013

GRIDWORLD OVERVIEW WHAT IS TESTABLE?

AP Programming GridWorld Lecture page 1 of 10

GridWorld An Introduction

Part 3: GridWorld Classes and Interfaces

Student Performance Q&A:

Student Performance Q&A:

AP COMPUTER SCIENCE AB 2008 SCORING GUIDELINES

Results from!the!2011 AP!Computer!Science A Exam Administration

AP PHYSICS B 2014 SCORING GUIDELINES

GridWorld AP Computer Science Case Study. Student Manual

AP GridWorld Review. Actor BoxBug Bug ChameleonCritter Critter Flower Rock

AP Computer Science A 2013 Free-Response Questions

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

AP COMPUTER SCIENCE A 2006 SCORING GUIDELINES

9/19/2018 Programming Data Structures. Polymorphism And Abstract

Inheritance and Polymorphism

Inheritance and Polymorphism

AP COMPUTER SCIENCE AB 2006 SCORING GUIDELINES

AP CALCULUS BC 2013 SCORING GUIDELINES

Student Performance Q&A:

C12a: The Object Superclass and Selected Methods

AP Computer Science A

AP Computer Science A 2004 Scoring Commentary

Object Oriented Programming. Java-Lecture 11 Polymorphism

Student Performance Q&A:

AP COMPUTER SCIENCE AB 2007 SCORING GUIDELINES

AP COMPUTER SCIENCE A 2010 GENERAL SCORING GUIDELINES

Chapter 10 Classes Continued. Fundamentals of Java

CMSC131. Inheritance. Object. When we talked about Object, I mentioned that all Java classes are "built" on top of that.

AP Computer Science A

AP Computer Science A

GridWorld AP Computer Science Case Study. Solutions Manual

CSE 142, Autumn 2018 Programming Assignment #9: Critters (20 points) Due Tuesday, December 4th, 9:00 PM

More On inheritance. What you can do in subclass regarding methods:

Critters. Critter #2 Attack.ROAR Attack.POUNCE Attack.SCRATCH. Critter #1

Inheritance and Polymorphism

Practice for Chapter 11

Critter #1 Attack.ROAR random winner #2 wins #1 wins Attack.POUNCE #1 wins random winner #2 wins Attack.SCRATCH #2 wins #1 wins random winner

AP PHYSICS B 2009 SCORING GUIDELINES

Midterm Exam CS 251, Intermediate Programming March 6, 2015

CompuScholar, Inc. 9th - 12th grades

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

C++ (Non for C Programmer) (BT307) 40 Hours

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

TeenCoder : Java Programming (ISBN )

CS-202 Introduction to Object Oriented Programming

Chief Reader Report on Student Responses:

JAVA OBJECT-ORIENTED PROGRAMMING

AP Computer Science A

Why Design by Contract! CS 619 Introduction to OO Design and Development. Design by Contract. Fall 2012

AP Computer Science A Course Syllabus

AP Computer Science Principles

Inheritance, and Polymorphism.

Inheritance and Polymorphism. CS180 Fall 2007

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

Chapter 11 Inheritance and Polymorphism. Motivations. Suppose you will define classes to model circles,

University of Utah School of Computing

CS 251 Intermediate Programming Inheritance

Chapter 2--BoxBug & SpiralBug

CSCI Lab 9 Implementing and Using a Binary Search Tree (BST)

Inheritance -- Introduction

The Java language has a wide variety of modifiers, including the following:

Prelim 1. Solution. CS 2110, 14 March 2017, 5:30 PM Total Question Name Short answer

Inheritance and Polymorphism

CS-140 Fall 2017 Test 2 Version A Nov. 29, 2017

Standard. Number of Correlations

AP Computer Science. Gridworld, inheritance

(12-1) OOP: Polymorphism in C++ D & D Chapter 12. Instructor - Andrew S. O Fallon CptS 122 (April 3, 2019) Washington State University

CMSC 132: Object-Oriented Programming II

CIS 110: Introduction to computer programming

Blue Pelican GridWorld

It is recommended you first backup your course and use the Accessibility Check tool on a course that is not yet available to students.

DOWNLOAD PDF CORE JAVA APTITUDE QUESTIONS AND ANSWERS

Microsoft Visual Basic 2005: Reloaded

Lesson 10. Work with Interfaces and Abstract Classes. Copyright all rights reserved

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

Creating a Multi-Dimensional Report

IST311. Advanced Issues in OOP: Inheritance and Polymorphism

What is Inheritance?

Java 1996 AP Computer Science Question 3

Object Oriented Issues in VDM++

Financial computing with C++

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

JAVA MOCK TEST JAVA MOCK TEST II

Weiss Chapter 1 terminology (parenthesized numbers are page numbers)

Course: AP Computer Science A Description and Syllabus Description of Course:

Chapter 11 Classes Continued

Prerequisite: Computer Science 2 (CS2) with a grade of B+ or better

CSE 331 Midterm Exam Sample Solution 2/18/15

Problem 5 Classroom Illness Program Solution

CPS122 Lecture: Detailed Design and Implementation

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

Compiler principles, PS1

Chapter 13 Abstract Classes and Interfaces. Liang, Introduction to Java Programming, Tenth Edition, Global Edition. Pearson Education Limited

OBJECT ORIENTED PROGRAMMING USING C++ CSCI Object Oriented Analysis and Design By Manali Torpe

Transcription:

AP COMPUTER SCIENCE A 2009 SCORING GUIDELINES Question 2: Stockpile Critter (GridWorld) +1 class header +1/2 properly formed class header for StockpileCritter +1/2 extends Critter class +1 1/2 stockpile state +1/2 declares instance variable capable of maintaining state +1/2 private visibility +1/2 initialization of state appropriate to usage of variable +1 overrides methods and maintains all necessary postconditions (No points awarded if overrides act method) +1 processactors overridden (No points awarded if overrides act method) +1 stockpile state maintenance +1/2 accumulates based on number of actors passed to processactors +1/2 decrements appropriately each act +1 1/2 removes neighboring actors from grid +1/2 removes at least one neighboring actor from grid +1 removes all neighboring actors from grid +2 self-removal +1/2 checks status of stockpile by using state variable in a relational expression +1/2 ever removes self from grid +1 removes self from grid when and only when stockpile state indicates empty 2009 The College Board. All rights reserved.

AP COMPUTER SCIENCE A 2009 SCORING COMMENTARY Question 2 Overview This question involved reasoning about the code from the GridWorld case study, emphasizing objectoriented concepts. Students demonstrated their understanding of the case study and its interacting classes by extending the Critter class to derive a StockpileCritter class with modified behavior. This question tested numerous concepts: creating a class, inheriting from an existing class, overriding appropriate methods, and maintaining the overridden methods postconditions. Students were specifically instructed not to override the act method, and they were explicitly cautioned to abide by the postconditions of all methods. Sample: A2a Score: 8 The student correctly declares a class StockpileCritter that extends Critter. There is a private instance variable, stockpile, that is correctly initialized. The student overrides selectmovelocation but fails to maintain all postconditions because the decrement of the stockpile causes a change in the critter s state. The student overrides the method processactors correctly. Within processactors, the student correctly adds the number of neighboring actors to the stockpile and correctly removes all these neighbors from the grid. The check for a instanceof Actor is redundant but causes no ill effects. The student checks the status of the stockpile in selectmovelocation and returns null when the stockpile is empty. This allows removeselffromgrid to be called in all appropriate cases. There is also a correct decrement to the stockpile. Sample: A2b Score: 5 The student correctly declares a class StockpileCritter but uses implements Critter instead of extends Critter. There is a private instance variable, energy, that is correctly initialized. The student fails to override the method selectmovelocation but overrides the method processactors correctly. Within processactors, the student incorrectly loops over getneighbors(getlocation) instead of over actors. This resulted in a ½-point loss for failing to accumulate based on the parameter actors and also resulted in a full-point loss for not correctly removing all the grid neighbors. The student received ½ point for removing one neighbor from the grid. There is a correct decrement to the stockpile. The student checks the status of the stockpile and correctly calls removeselffromgrid in one case. The student incorrectly calls removeselffromgrid when energy == 0. Sample: A2c Score: 2 The student correctly declares a class StockpileCritter that extends Critter. There is a private instance variable, energy. The student did not get the ½ point for initialization of state appropriate to usage because there is no usage of this instance variable. 2009 The College Board. All rights reserved.