AP Computer Science DYRT Quiz

Slides:



Advertisements
Similar presentations
AP Computer Science DYRT Quiz Key
Advertisements

Objectives Introduction to Inheritance and Composition (Subclasses and SuperClasses) Overriding (and extending), and inheriting methods and constructors.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
ITEC200 – Week03 Inheritance and Class Hierarchies.
Interface & Abstract Class. Interface Definition All method in an interface are abstract methods. Methods are declared without the implementation part.
Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved. 1 1 Abstract Classes and Interfaces.
Encapsulation, Inheritance & Interfaces CSE 115 Spring 2006 February 27, March 1 & 3, 2006.
Chapter 10 Classes Continued
8.1 Classes & Inheritance Inheritance Objects are created to model ‘things’ Sometimes, ‘things’ may be different, but still have many attributes.
JAVA COLLECTIONS LIBRARY School of Engineering and Computer Science, Victoria University of Wellington COMP T2, Lecture 2 Marcus Frean.
PreAP Computer Science Quiz
Inheritance in the Java programming language J. W. Rider.
PreAP Computer Science Review Quiz 08 Key
PreAP Computer Science Quiz Key
AP Computer Science A – Healdsburg High School 1 Interfaces, Abstract Classes and the DanceStudio - Similarities and Differences between Abstact Classes.
Interfaces Chapter 9. 9 Creating Interfaces An interface is a contract. Every class that implements the interface must provide the interface’s defined.
Take out a piece of paper and PEN. The quiz starts ONE minute after the tardy bell rings. You will have 45 – 90 seconds per question. Determine the output.
PreAP Computer Science Quiz Key
JAVA COLLECTIONS LIBRARY School of Engineering and Computer Science, Victoria University of Wellington COMP T2, Lecture 2 Thomas Kuehne.
Object Oriented programming Instructor: Dr. Essam H. Houssein.
AP Computer Science DYRT Quiz
Take out a piece of paper and PEN.
Abstract Classes and Interfaces Week 17.  Computer simulations  Abstract methods  Abstract classes  Interfaces  Multiple inheritance Abstract Classes.
PreAP Computer Science Quiz
// Java2101.java This program tests the features of the class. public class Java2101 { public static void main (String args[]) { System.out.println("\nJAVA2101.JAVA\n");
Take out a piece of paper and PEN.
JAVA COLLECTIONS LIBRARY School of Engineering and Computer Science, Victoria University of Wellington COMP T2, Lecture 2 Marcus Frean.
Terms and Rules II Professor Evan Korth New York University (All rights reserved)
POLYMORPHISM Chapter 6. Chapter Polymorphism  Polymorphism concept  Abstract classes and methods  Method overriding  Concrete sub classes and.
AP Computer Science DYRT Quiz
COP INTERMEDIATE JAVA Inheritance, Polymorphism, Interfaces.
Lecture 5:Interfaces and Abstract Classes Michael Hsu CSULA.
Notices Assn 2 is due tomorrow, 7pm. Moodle quiz next week – written in the lab as before. Everything up to and including today’s lecture: Big Topics are.
Lecture 6:Interfaces and Abstract Classes Michael Hsu CSULA.
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. Exposure Java 2014 for.
Lecture 5:Interfaces and Abstract Classes
Polymorphism in Methods
A Concrete Presentation on Abstract Classes and Methods, Interfaces, and Polymorphism CSC 202.
Advanced Programming in Java
Advanced Programming in Java
Interface, Subclass, and Abstract Class Review
Agenda Warmup AP Exam Review: Litvin A2
JAVA COLLECTIONS LIBRARY
Interfaces.
Inheritance, Polymorphism, and Interfaces. Oh My
Interface.
Pre-AP® Computer Science Quiz Key
Pre-AP® Computer Science Quiz
Interfaces.
Abstract Class As per dictionary, abstraction is the quality of dealing with ideas rather than events. For example, when you consider the case of ,
Advanced Java Programming
Advanced Programming in Java
Advanced Programming in Java
Take out a piece of paper and PEN.
PreAP Computer Science Review Quiz 08
PreAP Computer Science Quiz Key
Chapter 14 Abstract Classes and Interfaces
Take out a piece of paper and PEN.
PreAP Computer Science Quiz
Take out a piece of paper and PEN.
1.4 ทบทวน JAVA OO Programming Concepts Declaring and Creating Objects
Take out a piece of paper and PEN.
Take out a piece of paper and PEN.
Review of Previous Lesson
Assessment – Java Basics: Part 2
Take out a piece of paper and PEN.
Chapter 13 Abstract Classes and Interfaces Part 01
Inheritance Lakshmish Ramaswamy.
Pre-AP® Computer Science Quiz
Presentation transcript:

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.

Title the quiz as shown below The quiz starts in ONE minute. Name Period Date Quiz 14.01-10 1. 14. 2. 15. 3. 16. 4. 17. 5. 18. 6. 19. 7. 20. 8. 21. 9. 22. 10. 23. 11. 24. 12. 25. 13. EC.

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

Question 02 An interface contains method signatures. abstract constructors. concrete methods. abstract objects.

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.

Question 04 The methods in an interface must be abstract. must be concrete. must be constructors. can be all of the above.

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

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

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

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.

Question 09 A class can implement one abstract interface only. one concrete interface only. one or two interfaces only. multiple interfaces.

Question 10 An abstract interface can have abstract methods only. abstract fields. final fields that have initialized values. abstract constructors.

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

Question 12 An abstract class is _________ an interface. identical to quite similar to completely different from remotely similar to

Question 13 An abstract class can have abstract methods. concrete methods. constructors. All of the above.

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

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.

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.

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

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

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.

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.

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.

Question 22 List is a class. an interface. an operator. a method

Question 23 Set is a class. an interface. an operator. a method

Question 24 ArrayList is a class. an interface. an operator. a method

Question 25 Collection is a class. an interface. an operator. a method

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.