Computer Education Introduction to Computer Science Using Java™ Computer Education Introduction to Computer Science Using Java™   Glencoe Online
Computer Education Home Product Information Site Map Search Contact Us

Students

Self-Assessment Exercises

Chapter 9: Interfaces
      
  1.Which of the following is true about interfaces?  
  a.   They are contracts that say, “Every class that signs this contract will provide the methods defined in this interface.”  
  b.   You use the implements keyword to indicate that a class implements the interface.  
  c.   You can treat interfaces polymorphically.  
  d.   All of the above  
      
  2.To declare an interface, you use the ________ keyword.  
  a.   class  
  b.   extends  
  c.   interface  
  d.   implements  
      
  3.Interfaces can have ________.  
  a.   constants  
  b.   member fields  
  c.   methods that are not abstract  
  d.   None of the above  
      
  4.Which of the following object-oriented programming languages support multiple inheritance?  
  a.   C#  
  b.   C++  
  c.   Java  
  d.   All of the above  
      
  5.When you stub out a method you ________.  
  a.   create an abstract method  
  b.   never have to change that method again  
  c.   provide a snippet of code that shows what your method is intended to do  
  d.   All of the above  

 

McGraw-Hill Glencoe   The McGraw-Hill Companies
Self-Assessment Exercises
Java Compilers
Source Code
Java Resources
PowerPoint® Presentations
Home