/***************************************** * Instructions * - Replace 'uwuserid' with your uWaterloo User ID * - Select the current calendar term and enter the year * - List students with whom you had discussions and who helped you * * uWaterloo User ID: uwuserid @uwaterloo.ca * Submitted for ECE 250 * Department of Electrical and Computer Engineering * University of Waterloo * Calender Term of Submission: (Winter|Spring|Fall) 201N * * By submitting this file, I affirm that * I am the author of all modifications to * the provided code. * * The following is a list of uWaterloo User IDs of those students * I had discussions with in preparing this project: * - * * The following is a list of uWaterloo User IDs of those students * who helped me with this project (describe their help; e.g., debugging): * - *****************************************/ #ifndef SINGLE_LIST_H #define SINGLE_LIST_H #ifndef nullptr #define nullptr 0 #endif #include "ece250.h" #include "SingleNode.h" #include "Exception.h" template class SingleList { private: SingleNode *list_head; SingleNode *list_tail; int count; public: SingleList(); SingleList( SingleList const & ); ~SingleList(); SingleList &operator=( SingleList const & ); // Accessors int size() const; bool empty() const; Type front() const; Type back() const; SingleNode *head() const; SingleNode *tail() const; bool member( Type const &obj ) const; // Mutators void push_front( Type const &obj ); void push_back( Type const &obj ); Type pop_front(); bool remove( Type const &obj ); }; template SingleList::SingleList(): list_head( 0 ), list_tail( 0 ), count( 0 ) { // empty constructor } template SingleList::SingleList( SingleList const &list ): list_head( 0 ), list_tail( 0 ), count( 0 ) { *this = list; } template SingleList::~SingleList() { // enter your implementation here } template SingleList &SingleList::operator=( SingleList const &rhs ) { // empty the current object // make a copy of the list rhs return *this; } template int SingleList::size() const { // enter your implementation here return 0; } template bool SingleList::empty() const { // enter your implementation here return true; } template Type SingleList::front() const { // enter your implementation here return Type(); } template Type SingleList::back() const { // enter your implementation here return Type(); } template SingleNode *SingleList::head() const { // enter your implementation here return 0; } template SingleNode *SingleList::tail() const { // enter your implementation here return 0; } template bool SingleList::member( Type const &obj ) const { // enter your implementation here return false; } template void SingleList::push_front( Type const &obj ) { // enter your implementation here } template void SingleList::push_back( Type const &obj ) { // enter your implementation here } template Type SingleList::pop_front() { // enter your implementation here return Type(); } template bool SingleList::remove( Type const &obj ) { // enter your implementation here return false; } #endif