school/cs235/exam1/polylist.h

32 lines
1.0 KiB
C
Raw Normal View History

2016-04-06 20:46:10 -07:00
//Derek McQuay 647465151 CS 235 Fall 2012 midterm 1
#ifndef __POLYLIST_H__
#define __POLYLIST_H__
#include "PolynomialListInterface.h"
#include "node.h"
#include <cctype>
#include <string>
#include <sstream>
#include <vector>
#include <iostream>
using namespace std;
class polylist : public PolynomialListInterface {
public:
polylist();
~polylist();
node* head;
void insert(string term);
void clear();
string at(int index);
int size();
string printList();
void remove(int exponent);
void insertAfter(int exponent, int coefficient, char value, int insertionNodeExponent);
void insertTail(int exponent, int coefficient, char value);
void insertHead(int exponent, int coefficient, char value);
};
vector<string> parse_expression(string expression); //these are included outside of the class because i used them in my test.cpp
bool is_valid(vector<string> expression); //and wanted them not to be included in the class
#endif