Copyright

Interfaces & Inheritance in Java Chapter Exam

Exam Instructions:

Choose your answers to the questions and click 'Next' to see the next set of questions. You can skip questions if you would like and come back to them later with the yellow "Go To First Skipped Question" button. When you have completed the practice exam, a green submit button will appear. Click it to see your results. Good luck!

Page 1

Question 1 1. Examine the following code. The parent class is _____ and the interface is _____

Question 2 2. Using interfaces in Java can help achieve _____ which is not technically allowed in the core language

Question 3 3. Examine the following code. Is it possible to add another method in the interface orderUpdate?

Question 4 4. In order to use an interface in a class, the _____ keyword is required.

Question 5 5. Which code snipped shows the correct way to use the methods from Orders in the class OrderType?

Page 2

Question 6 6. Of the following types, what type of class would Product be?

Question 7 7. Which of the following correctly shows the Oval class using the Shape interface?

Question 8 8. An abstract class cannot _____

Question 9 9. Java doesn't allow _____, meaning one class cannot inherit from more than one parent class.

Question 10 10. Which of the following classes would be suitable as an abstract class?

Page 3

Question 11 11. The method of the parent class can be re-used and modified in a subclass inherited from the parent class. What is the term used to reference this behavior?

Question 12 12. Which phrase accurately describes the relationship between the subclass BlueChip and the parent Stock?

Question 13 13. Examine the following code. Which variable CANNOT be used in the parent class of Benefit?

Question 14 14. A parent class is also called a _____

Question 15 15. Which of the following correctly creates a subclass, or child class, from the main Employee class?

Page 4

Question 16 16. Examine the following class declaration? Is this valid?

Question 17 17. Polymorphism means _____

Question 18 18. Polymorphism supports _____, which is several methods with the same name but different arguments.

Question 19 19. Examine the following code. It can be said that the class Banana _____ attributes from the class Fruit

Question 20 20. Examine the following code. What is true about the method increaseSpeed()?

Interfaces & Inheritance in Java Chapter Exam Instructions

Choose your answers to the questions and click 'Next' to see the next set of questions. You can skip questions if you would like and come back to them later with the yellow "Go To First Skipped Question" button. When you have completed the practice exam, a green submit button will appear. Click it to see your results. Good luck!

Java Programming Tutorial & Training  /  Business Courses
Support