1. Engineering
  2. Computer Science
  3. please help me on all the questions really need...

Question: please help me on all the questions really need...

Question details

Please help me on all the questions !!!!!!!! Really need help! Will give a thumb up for helping.

  1. In the LList implementation of a list, the constructor and the clear method

a.have the same functionality


b.do completely different things


c.unnecessary

d.none of the above

2. In the linked implementation of a list, the add method

public void add(T newEntry)

inserts a new entry


a. at the end of the list


b. at the beginning of the list


c. between adjacent nodes of the list

d. all of the above

Short Answer (7)

  1. If myList is a declared ADT list and the front of the list is on the left, show the contents of the list after applying the following pseudo code?

    myList.add(“Tom”) myList.add(“Hank”) myList.add(3, “Ryan”) myList.add(1, “Sally”) myList.add(“Helen”)

  2. If myList is a declared ADT list and the front of the list is on the left, show the contents of the list after applying the following pseudo code?

    myList.add(“Tom”) myList.add(“1, Hank”) myList.add(2, “Ryan”) myList.add(“Sally”) myList.add(3, “Helen”)

  1. Make a case for the designer of an interface to determine what behavior is appropriate when a collection such as a list is empty.

  2. If myList is a declared ADT list and the front of the list is on the left, show the contents of the list after applying the following pseudo code?

    myList.add(“horse”) myList.add(“goat”) myList.add(1, “fish”) myList.add(“cat”) myList.remove(1) myList.add(2, “dog”)

  3. If myList is a declared ADT list and the front of the list is on the left, show the contents of the list after applying the following pseudo code?

    myList.add(“horse”) myList.add(“goat”) myList.add(1, “fish”) myList.add(“cat”) myList.remove(2) myList.add(3, “dog”) myList.replace(2, “frog”)

  4. Given treeList is a declared ADT list that is initially empty, write a serious of list operations to generate the following list step by step.

    a. maple
    b. maple, oak
    c. maple, elm, oak d. palm, elm, oak

  5. Given treeList is a declared ADT list that is initially empty, write a serious of list operations to generate the following list step by step.

    1. maple

    2. oak, maple

    3. oak, elm, maple

    4. elm, maple

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution