subject

Recall the definition of LinkedList from class. I've made a doubly linked list which is a child class of LinkedList. A doubly linked list has a first and last node and each node has a previous and a next pointer to other nodes. What is wrong with this function (it would be defined in DLinkedList. h but the error is in this function)? virtual void insertEnd(LLNode * toAdd)
{
LLNode * oldLast = getLastNode();

oldLast->setNext(toAdd);

p_last = toAdd;
toAdd->setPrev(oldLast);
}

Select one:
a. The previous pointer for the added node was not set.
b. oldLast may be NULL and can cause a NULL pointer exception.
c. insertEnd in LinkedList is a private function
d. If toAdd is NULL, "oldLast->setNext(toAdd);" causes a NULL pointer exception.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:40
Consider the simple 3-station assembly line illustrated below, where the 2 machines at station 1 are parallel, i.e., the product only needs to go through one of the 2 machines before proceeding to station 2.what is the throughput time of this process?
Answers: 2
question
Computers and Technology, 22.06.2019 19:30
The following is an excerpt from a slide presentation. today we will inverse operations solving equations using inverse operations solving inequalities using inverse operations from which part of the presentation does the slide most likely come from? a. introduction b. outline c. body d. conclusion
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
1. you have a small business that is divided into 3 departments: accounting, sales, and administration. these departments have the following number of devices (computers, printers, etc.): accounting-31, sales-28, and administration-13. using a class c private network, subnet the network so that each department will have their own subnet. you must show/explain how you arrived at your conclusion and also show the following: all available device addresses for each department, the broadcast address for each department, and the network address for each department. also, determine how many "wasted" (not usable) addresses resulted from your subnetting (enumerate them).
Answers: 3
question
Computers and Technology, 23.06.2019 08:30
Helen's credit card has an apr of 15.32% and a grace period of 17 days and helen pays her balance in the full every month. if her last billing cycle ended on september 26, 2009, and she made her payment on october 11, 2009, did she owe any interest on her last statement's balance?
Answers: 3
You know the right answer?
Recall the definition of LinkedList from class. I've made a doubly linked list which is a child clas...
Questions
question
Mathematics, 10.12.2020 02:10
question
English, 10.12.2020 02:10
question
Spanish, 10.12.2020 02:10
question
Mathematics, 10.12.2020 02:10
Questions on the website: 13722367