List three assumptions that need to be made when inserting and removing items from an array. What happens when any of the assumptions is not met?

What will be an ideal response?


There are four assumptions:
1. Arrays are of fixed size; thus, when an array becomes full, insertions are not performed.
2. We are working with an array of objects, although we can modify the code to cover arrays of integers, employees, or whatever element type is desired.
3. For successful insertions, 0 <= target index <= logical size. The new element is inserted before the element currently at the target index, or after the last element if the target index equals the logical size.
4. For successful removals, 0 <= target index < logical size.

When an assumption is not satisfied, the operation is not performed and we return false;
otherwise, the operation is performed and we return true.

Computer Science & Information Technology

You might also like to view...

Ayman’s Office Supplies Company recently had a new information system installed to help its managers with inventory. In speaking with the managers, you notice that they seemed disgruntled with the system output, which is a series of displays that show current inventory, customer and supplier addresses, and so on. All screens need to be accessed through several special commands and the use of a password. The managers had several opinions about the system but had no systematic way to evaluate it.

a. Devise a checklist or form that helps Ayman’s managers evaluate the utilities of an information system. b. Suggest a second way to evaluate the information system.

Computer Science & Information Technology

What type of files are compressed by Access when you attach them?

A) Word and Excel files B) Word and JPEG files C) Excel and JPEG files D) JPEG and other photo formats

Computer Science & Information Technology

What are the three types of software requirements?

A. High; medium; and low B. High; medium; and detailed C. High; detailed; and low D. Overview; medium; and low

Computer Science & Information Technology

Which of the following is not an SQL keyword?

A. DELETE B. REMOVE C. CREATE D. SELECT

Computer Science & Information Technology