Welcome to Unit 9 AP Computer Science A Multiple Choice Questions! Grab some paper and a pencil π to record your answers as you go. You can see how you did on the
Unit 9 Practice Questions Answers and Review sheet once you're done. Don't worry, we have tons of resources available if you get stumped π on a question. And if solo study is not your thing, join a group in
Hours!
Not ready to take a quiz yet?
Start studying unit 9 Here: Intro to Unit 9Image From Wikipedia.
Facts about the test: The AP Computer Science A exam has 40 multiple choice questions and you will be given 90 minutes to complete the section. That means it should take you around 23 minutes to complete 10 questions.
*The following questions were not written by CollegeBoard and although they cover information outlined in the AP Computer Science A Course and Exam Description the formatting on the exam may be different.
1. Which one of these is the correct way to make a subclass?
A. public class SubClass extends SuperClass {}
B. public class SubClass {}
C. public class SubClass parent SuperClass {}
D. public class SubClass super SuperClass {}
2. What keyword is used to call objects in the parent class including constructors, variables, methods, etc.?
A. this
B. extends
C. requires
D. ββsuper
3. Given the code below, which method successfully overloads the getItem method in the parent class?
A.Β
B.Β
C.Β
D.Β
4. Given the code below, which method successfully overrides the getItem method in the parent class?
A.Β
B.Β
C.Β
D.Β
5. Given the code below, which one would result in the code not compiling?
A.Β
B.Β
C.Β
D.Β
6. Given the classes and subclasses created below, which object creation results in an exception when it executes?
A.Β
B.Β
C.Β
D.Β
7. Given the code below, what will be printed out if the code in another class is called?
A. OneTwo
B. Three
C. OneTwoFourThree
D. OneTwoThreeFour
8. What methods are usually inherited from the Object superclass that are often overriden?
A.Β I
B.Β II
C.Β I, II
D.Β I, II, III
9. What does the keyword static mean when used?
A. This variable/method belongs to the class and is not specific for each instance created of that class.
B. This variable/method belongs to an object created of the class and is specific for each instance created of that class.
C. This variable/method belongs to the class and is specific for each instance created of that class.
D. This variable/method belongs to an object created of the class and is not specific for each instance created of that class.
10. Given the classes below, what will be returned if the following main method is called?
A. 25.25
B. 30.75
C. compiler error due to a CottonPillow object created in place of a Pillow object
D. compiler error due to CottonPillow not having a getActualCost() method