Question 1 An ADT is a(n) _____. Question 2 In the bag abstract data type, _____
ID: 3600422 • Letter: Q
Question
Question 1
An ADT is a(n) _____.
Question 2
In the bag abstract data type, _____.
Question 3
_____ is not a typical operation of the list ADT.
Question 4
The following class corresponds to the array implementation of a _____.
public class MyClass
{
public MyClass();
public boolean isEmpty() {}
public void display() {}
public void add(int) {}
public void add(int location, int item) {}
public void remove(int item) {}
private int list[100];
private int length;
};
Explanation / Answer
1.
An ADT is a mathematical abstraction.
Option 4 correct.
Explanation:
2.
In the bag abstract data type, the locations of items are not relevant.
Option 2 correct.
Explanation:
3.
Computing the union of two lists is not a typical operation of the list ADT.
Option 4 correct.
Explanation:
Typical operation of the list ADT :
4.
The following class corresponds to the array implementation of a list.
Option 1 correct.
Explanation:
In the program we do different list operations.
Inserting an item in the listRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.