ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 22 May 2017 My Price 9.00

line049 in code

newNode->setNext(currentNode->getNext());

sir can you please tell what happen in this line 

line049 in code

 

 

#include<iostream>#include<stdlib.h>using namespace std;/* The Node class */classNode{public:intget() { returnobject; };voidset(intobject) { this->object=object; };Node* getNext() { returnnextNode; };voidsetNext(Node* nextNode) { this->nextNode=nextNode; };private:intobject;Node* nextNode;};/* The List class */classList{private:intsize;Node *headNode;Node *currentNode;Node *lastCurrentNode;public:List(){headNode=new Node();headNode->setNext(NULL);currentNode=NULL;lastCurrentNode=NULL;size=0;}voidadd (intaddObject){Node *newNode=newNode();newNode->set(addObject);if( currentNode!=NULL ){newNode->setNext(currentNode->getNext());currentNode->setNext( newNode );lastCurrentNode=currentNode;currentNode=newNode;}else{newNode->setNext(NULL);headNode->setNext(newNode);lastCurrentNode=headNode;currentNode=newNode;}size ++;}void display()

Answers

(11)
Status NEW Posted 22 May 2017 03:05 AM My Price 9.00

-----------

Not Rated(0)