Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please help me fill these in, thank you!! // This is the implementation file for

ID: 3544384 • Letter: P

Question

Please help me fill these in, thank you!!

// This is the implementation file for the method that prints the items in
// a list for a ListClass object.

#include "inlab6.h"
#include <iostream>
#include <fstream>
#include <stdlib.h>
using namespace std;

#include "structs.h"


// This function prints (iteratively) the contents of the list.
void ListClass::printList()
{
    NodePtrType ptr = head;

//    The following is the code necessary to print out the items
//    in the list.  Each node is printed on a line with the
//    account number then a tab then the balance.  To output a tab
//    character, use
//    cout << " "
//    Do not output any labels.  Just put the contents of the node.
//    For instance
//    1114    395.67
     Replace this text with the code necessary to print out the items in the list.  Each node is printed on a line with the account number then a tab then the balance.  To output a tab character, use cout << " " Do not output any labels.  Just put the contents of the node. For instance 1114 395.67 (If you delete these instructions, they are repeated in the comment above this textbox)
}

**********************



Explanation / Answer

while (ptr!=NULL)

{

cout<<ptr->accountNumber<<" "<<ptr->balance<<" ";

ptr=ptr->next;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote