Please send questions to st10@humboldt.edu .

// Implementation file for class MyNode
//
// by: Sharon M. Tuttle
// last modified: 11-12-03

#include <iostream>
#include "MyNode.h"
using namespace std;

//-----
// constructors
//-----

MyNode::MyNode()
{
    quant = 0;
    cost = 0;
    nextPtr = NULL;
}

MyNode::MyNode(int newQuant, float newCost)
{
    quant = newQuant;
    cost = newCost;
    nextPtr = NULL;
}

//-----
// accessors
//-----

int MyNode::get_quant() const
{
    return quant;
}


float MyNode::get_cost() const
{
    return cost;
}

MyNode* MyNode::get_nextPtr() const
{
   return nextPtr;
}

//-----
// mutators
//-----

void MyNode::set_quant(int newQuant)
{
    quant = newQuant;
}

void MyNode::set_cost(float newCost)
{
    cost = newCost;
}

void MyNode::set_nextPtr(MyNode *nextNodePtr)
{
    nextPtr = nextNodePtr;
}