Koofers

Quiz for CS 1706 - Intro Obj-Oriented Development with Barnette at Virginia Tech (VT)

Quiz Information

Material Type:Quiz 3
Professor:Barnette
Class:CS 1706 - Intro Obj-Oriented Development
Subject:Computer Science
University:Virginia Polytechnic Institute And State University
Term:Fall 2006
Keywords:
  • Provided That
  • Implementation
  • Abstract Class
  • Encapsulation
  • Following Code
  • Derived Class
  • Development
  • In Front (of)
  • In Front Of
Login / Sign Up to View Document
Preview Page 1

Sample Document Text

CS1706 Quiz/HW 3 Fall 2006 1.) Following Drake's implementation of a stack, peek should data[size-1] 2.) In java, the size of an array can be changed after it is allocated by changing the size field. False 3.) Abstract methods must be provided by any nonabstract subclasses. True 4.) Following Drake's implementation, the back of the queue should be at (front + size) % data.length 5.) Using the implementation provided by Drake, to shrink an array, one must decrease the size 6.) An abstract class may have fields, abstact methods, and nonabstract methods and CANNOT be instantiated. 7.) In Java, the Stack class extends Vector. Is this a good practice? No, because it breaks the encapsulation of the derived class (Stack). 8.) Which is NOT a part of the Java Collections Framework? ArrayQueue 9.) For an iterator, the remove() method removes the element that would be returned by the next call to next(). False 10.) What is the contents of list after the following code is run? l l l l l l i s t . add ( "a" ) ; i s t . a...

Related Documents

Default Parameter Exam
Either...or Exam
Initialization Notes
Initialization Notes
Initialization Notes
Current Number Exam
Catheterization Notes
Catheterization Notes
Static Int Foo Notes
Provided That Exam
Declaration Exam
String Course Exam
String Course Exam
String Course Exam
Unauthorized Exam
Cultural Eutrophication Exam
155, "/var/app/current/tmp/"