Question: 1. The following code results in garbage being created: Circle c1 = new Circle(8); Circle c2; T or F 2. UML diagrams are a form

1. The following code results in garbage being created:

Circle c1 = new Circle(8);

Circle c2;

T or F

2. UML diagrams are a form of abstraction, since they hide details and allow us to concentrate just on the major design components. T/F

3. The binary search algorithm is O(N) where N is the size of the sorted array. T/F

4. TheisEmptyoperation as defined for the text's Queue ADT throws theQueueUnderflowException on an empty queue. T/F

5. When a binary search tree is balanced, it provides O(log2N) search, addition, and removal. T/F

6. Java supports single inheritance only, i.e., a class can only directly inherit from a single superclass. T/F

7. If N represents the number of elements on the stack, then theisFullmethod of theArrayBoundedStackclass is O(N). T/F

8. The static storage allocation approach creates space for a method when the method is invoked. T/F

9. A java interface can inherit from at most one other interface.T/F

10. A depth-first traversal of a tree is also known as a level-order traversal.T/F

11. (N + 1)(3N3+ 5N2+ 27N +17) is O(N4) T/F

12. Unlike Quick Sort, Heap Sort's efficiency is not affected by the initial order of the elements. T/F

13. The dynamic storage allocation approach creates space for a method when the method is invoked. T/F

14. When implementing a queue with a linked list, the front of the queue is also the front of the linked list. T/F

15. OurBSTNodeclass is a self-referential class. T/F

16. A disadvantage of Quick Sort is that it requires an auxiliary array that is as large as the original array to be sorted. T/F

17. If N represents the maximum possible number of elements on the stack, then theLinkedStackconstructor is O(N). T/F

18. If the base case does not exist or is not reached, then there is infinite recursion. T/F

19. A standard linked list provides a good implementation of a "Deque". T/F

20. Thecontainsmethod of our binary search tree examines every node in the tree before returning a result offalse. T/F

21. When using Merge Sort, at each stage, the part of the array being sorted is divided into two "piles", with everything in the left pile less than everything in the right pile. T/F

22. Even though our stacks will be generic, ourStackInterfaceis not generic. T/F

23. Recursive methods must always contain a path that does not contain a recursive call. T/F

24. A queue is a first in, first out structure. T/F

25. When a binary search tree is balanced, it provides O(N2) search, addition, and removal. T/F

26. Java programmers define their own exceptions by extending the library's Exception class. T/F

27. The following expression is balanced:( ( xx [ {{ ** }} ] XX ) ) T/F

28. Recursive methods are always shorter and clearer than the equivalent nonrecursive methods. T/F

29. IfNrepresents the number of elements in the queue, then thesizemethod of theArrayBoundedQueueclass isO(N). T/F

30. The number of nodes in a non-empty tree is equal to the number of nodes in its left subtree plus the number of nodes in its right subtree. T/F

31. In Java, the Object class is the root of the inheritance tree. T/F

32.An abstract data type is a data type whose properties (domain and operations) are specified independently of any particular implementation. T/F

33. If N represents the number of elements in the list, then the index-based remove method of the ABList class is O(N). T/F

34. OurLinkedQueueclass extends theQueueInterfaceinterface. T/F

35. A tree node's unique predecessor is its parent. T/F

36. The toString method of theObjectclass returns a string representing some of the internal system implementation details of the object. T/F

37. The abstract level of an ADT provides a specific representation of the structure to hold the data and the implementation of the operations. T/F

38. A list is a collection with additional index- and iteration- related operations. T/F

39. The enqueue operation should be classified as a "transformer." T/F

40. A tree node and all of its descendants form a subtree that is rooted at the node. T/F

41. O(n) is called quadratic time. T/F

42. A precondition is an assumption that must be true on entry into a method for it to work correctly. T/F

43. When an object of class LBList represents an empty list, its front variable is null. T/F

44. Even though our queues will be generic, ourQueueInterfaceis not generic. T/F

45. The number of different binary trees that can be made from 2 nodes that contain the key values 3 and 6 is 2. T/F

46. Polymorphism means many objects can be instantiated from a single class definition. T/F

47. Given the following infix expression,

a + b * c - d

its equivalent postfix expression is the following:

a b c * + d -

T or f

48. The iterator operation is required by the Iterable interface. T/F

49. An application can indicate a specific way to order the elements of a SortedABList list by passing a Comparator object to a constructor of the list class. T/F

50. TheQueueInterfaceinterface represents a contract between the implementer of a Queue ADT and the programmer who uses the ADT. T/F

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!