Question

please answer all questions thanks

Question 21 Not yet In a linked-node implementation of a ADT, node does not reference the data in another node answered Point
Question 23 Not yet An array implementation of an ADT potentially wastes more space than a linked implementation answered Poi
Question 25 Should Node be a public class? Briefly explain Not yet answered Answer: Points out of 3.00 Flag question
Question 26 What is the simplest and shortest way to implement the clear() method in a linked bag? Not yet answered Points ou
Question 29 Placing the Node class inside the LinkedBag class makes it a(n) Not yet answered Points out of 2.00 Select one: a
0 0
Add a comment Improve this question Transcribed image text
Answer #1

21 - FALSE

23 - TRUE

25 - Yes, Node should be a public class . A Node provides a generic node for a linked list. Each node contains a piece of data (which is a reference to an object) and a link (which is a reference to the next node of the list). The reference stored in a node can be null. So, if it is not public we cannot create a Node class as it cannot be accessed publicly.

26 - clear() method only clears all the element from the list and not deletes the list.

The simplest and shortest method to implement the clear() method is - list.clear();

27 - (c) It avoids moving data when adding or removing bag entries.

28 - (a) at a rondom place. (we can insert it at anywherein the list)

29 - (b) inner class

30 - (a) all options are valid

Add a comment
Know the answer?
Add Answer to:
please answer all questions thanks Question 21 Not yet In a linked-node implementation of a ADT,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT