Download presentation
Presentation is loading. Please wait.
1
AP Computer Science DYRT Quiz 14.01-10
Take out a piece of paper and PEN. The quiz starts TWO minutes after the tardy bell rings. You will have 30 seconds per question.
2
Title the quiz as shown below The quiz starts in ONE minute.
Name Period Date Quiz 1. 14. 2. 15. 3. 16. 4. 17. 5. 18. 6. 19. 7. 20. 8. 21. 9. 22. 13. EC.
3
Question 01 The term __________ is used when describing
multiple method declarations with the same method identifier. It also describes the + operator. overloaded concatenation constructing polymorphism
4
Question 02 An interface contains method signatures.
abstract constructors. concrete methods. abstract objects.
5
Question 03 A class, which implements an interface,
must implement the interface constructor. must implement at least one method. must implement all the interface methods. must implement all the attributes.
6
Question 04 The methods in an interface must be abstract.
must be concrete. must be constructors. can be all of the above.
7
Question 05 Which program features distinguish an interface?
The keyword interface. Method signatures that end with semi-colons. Headings that lack method bodies. All of the above
8
Question 06 What is true about an interface? An interface is abstract.
All methods in an interface are abstract. An implementing class must implement every method declared in the interface. An interface has no constructors. All of the above
9
Question 07 Assume that an Animal interface is declared.
Which of the following Aardvark class headings properly implements the interface? class Animal implements Aardvark class Animal extends Aardvark class Aardvark extends Animal class Aardvark implements Animal
10
Question 08 What is true about a class that implements the
methods of an interface? Only the interface methods can be implemented. Only the abstract interface methods can be implemented. The interface methods, as well as, any additional methods can be implemented. The interface methods, as well as, constructor methods only can be implemented.
11
Question 09 A class can implement one abstract interface only.
one concrete interface only. one or two interfaces only. multiple interfaces.
12
Question 10 An abstract interface can have abstract methods only.
abstract fields. final fields that have initialized values. abstract constructors.
13
Question 11 What is true about field attributes in an interface?
Fields may be used in an interface declaration. All fields must have an initialized value. Field values are constant and cannot be changed. The final keyword is optional. Final is implied. All of the above
14
Question 12 An abstract class is _________ an interface. identical to
quite similar to completely different from remotely similar to
15
Question 13 An abstract class can have abstract methods.
concrete methods. constructors. All of the above.
16
Question 14 Implementing classes for interfaces use the
keyword ______ and implementing classes for abstract classes use the keyword ______ implements extends extends implements abstract concrete abstract extends
17
Question 15 What is true about interfaces and abstract classes?
An interface and an abstract class have identical capabilities. An interface can do everything an abstract class can do and more. An abstract class can do everything an interface can do and more. An interface and an abstract class have totally different capabilities.
18
Question 16 Which is more abstract, an interface or an abstract class?
An interface, only if it is abstract Both an interface and an abstract class are equally abstract.
19
Question 17 Setting up polymorphism requires an interface.
an abstract class. an umbrella class. multiple classes implementing/re-defining methods. All of the above (A or B or C) and D
20
Question 18 Which of the following Java features makes
polymorphism possible? Java allows the implementation of abstract methods and concrete methods. Java allows inheritance with multiple super classes. Java allows the use of a higher class or interface in the parameter signature of a method heading. None of the above
21
Question 19 A Collection is a group of objects.
linear collection that can have duplicate elements. linear collection that cannot have duplicate elements. unordered collection that can have duplicate elements. unordered collection that cannot have duplicate elements.
22
Question 20 A List is a group of objects.
linear collection that can have duplicate elements. linear collection that cannot have duplicate elements. unordered collection that can have duplicate elements. unordered collection that cannot have duplicate elements.
23
Question 21 A Set is a group of objects.
linear collection that can have duplicate elements. linear collection that cannot have duplicate elements. unordered collection that can have duplicate elements. unordered collection that cannot have duplicate elements.
24
Question 22 List is a class. an interface. an operator. a method
25
Question 23 Set is a class. an interface. an operator. a method
26
Question 24 ArrayList is a class. an interface. an operator. a method
27
Question 25 Collection is a class. an interface. an operator. a method
28
Extra Credit Why is true about the abstract keyword with an
interface declaration? It is required for the interface heading only. It is required for the method headings only. It is required for both the interface heading and the method headings. It is optional for the interface heading and the method headings.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.