/*----
  signature: main: void -> int
  purpose: playing around with the Node class

  compile using:
      g++ node-play.cpp Node.cpp -o node-play
  run using:
      ./node-play
 
  by: Sharon Tuttle
  last modified: 2022-10-25
----*/

#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
#include "Node.h"    
using namespace std;

int main()
{
    cout << boolalpha;

    Node *p_ptr;
    Node *q_ptr;

    p_ptr = new Node;
    q_ptr = new Node(4, p_ptr);

    cout << endl;
    cout << "at the beginning: " << endl;

    cout << "by the way: p_ptr contains: " << p_ptr
         << endl;

    p_ptr->display();
    cout << endl;
    q_ptr->display();

    q_ptr->set_data(387);

    cout << endl;
    cout << "after calling q_ptr->set_data(387):"
         << endl;

    q_ptr->display();

    delete p_ptr;
    delete q_ptr;

    cout << endl;
    return EXIT_SUCCESS;
}