Contains the source code from the course work throughout my undergraduate Computer Engineering degree at Brigham Young University. There is a mixture of Go, Python, C, C++, Java, VHDL, Verilog, Matlab, Bash, Assembly, etc..
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines

  1. //Derek McQuay 647465151 CS 235 Fall 2012 midterm 1
  2. #ifndef __POLYLIST_H__
  3. #define __POLYLIST_H__
  4. #include "PolynomialListInterface.h"
  5. #include "node.h"
  6. #include <cctype>
  7. #include <string>
  8. #include <sstream>
  9. #include <vector>
  10. #include <iostream>
  11. using namespace std;
  12. class polylist : public PolynomialListInterface {
  13. public:
  14. polylist();
  15. ~polylist();
  16. node* head;
  17. void insert(string term);
  18. void clear();
  19. string at(int index);
  20. int size();
  21. string printList();
  22. void remove(int exponent);
  23. void insertAfter(int exponent, int coefficient, char value, int insertionNodeExponent);
  24. void insertTail(int exponent, int coefficient, char value);
  25. void insertHead(int exponent, int coefficient, char value);
  26. };
  27. vector<string> parse_expression(string expression); //these are included outside of the class because i used them in my test.cpp
  28. bool is_valid(vector<string> expression); //and wanted them not to be included in the class
  29. #endif