COP3530/Project4/cirSLList.h
2023-06-23 19:29:02 -04:00

34 lines
649 B
C++

//************************ cirSLList.h **************************
// singly-linked list class to store integers
#ifndef INT_LINKED_LIST
#define INT_LINKED_LIST
#include "circle.h"
class cirSLLNode {
public:
Circle info;
cirSLLNode(double el, cirSLLNode *ptr = 0) {
info.setRadius(el); next = ptr;
}
cirSLLNode *next;
};
class cirSLList {
public:
cirSLList() {
head = tail = NULL;
}
~cirSLList();
int isEmpty() {
return head == 0;
}
void addToTail(double);
bool isInList(Circle) const;
void displayAllElements();
private:
cirSLLNode *head, *tail;
};
#endif