Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

20. In the object-oriented design of an airline passenger reservation program, s

ID: 3597032 • Letter: 2

Question

20. In the object-oriented design of an airline passenger reservation program, suppose that airplane seat," "aisle seat," and "window seat" have been identified as objects. Focusing specifically on the aisle seat object, how does it relate to the airplane seat object? A) A has-a relationship B) An is-a relationship C) An independent and equal relationship D) Both a has-a relationship and an is-a relationship E) None of these answers is correct. 21. How can an unbounded ADT be implemented as an array-based structure? A) When the array is full, a larger array is allocated and the current array elements are copied to thee new array B) When the array is full, new items simply overwrite older items in the array C) When the array is full, a second array is allocated and the structure contains both arrays D) It is not possible to implement an unbounded ADT as an array-based structure 22. Why do we use linear search instead of binary search when there are relatively few items in an array-based sorted list? A) Linear search will perform fewer iterations than binary search B) Because binary search requires more operations per iteration, it is slower than linear search in this case C) Linear search has a faster complexity class when lists are short. D) We never use linear search instead of binary search

Explanation / Answer

20)The aisle seat is related to the airplane seat by is a relationship

As the aisle seat is subclass of aeroplane seat.

21)

d) It is not possible to to implement the unbounded ADT as the array based structure

22)

b)Because binary search requires more operations per iteration, it is slower than linear search in this case