#ifndef SINGLELIST_H
#define SINGLELIST_H
/*****************************************
*
* Author: Harder, Douglas Wilhelm
* Student ID: 12345678
* Submitted for ECE 250
* Semester of Submission: Fall 2006
*
* By submitting this file, I affirm that
* I am the author of all modifications to
* the provided code.
*
*****************************************/
#include "SingleNode.h"
#include "Exception.h"
template <typename Object>
/**************
* Class Name *
**************/
class SingleList {
/**************
* Attributes *
**************/
private:
SingleNode<Object> * list_head; // initialized in constructor
SingleNode<Object> * list_tail; // initialized in constructor
int count; // initialized in constructor
/**************
* Operations *
**************/
public:
SingleList();
SingleList( const SingleList & list );
~SingleList(); // destroy()
// Accessors (these do not modify the object itself, but rather report information)
int size() const;
bool empty() const;
Object front() const;
Object back() const;
SingleNode<Object> * head() const;
SingleNode<Object> * tail() const;
bool member( const Object & obj ) const;
// Mutators (these may change the object itself)
void push_front( const Object & obj ); // no return type
void push_back( const Object & obj ); // no return type
Object pop_front();
bool remove( const Object & obj );
};
template <typename Object>
SingleList<Object>::SingleList() {
// enter your implementation here
}
template <typename Object>
SingleList<Object>::SingleList( const SingleList<Object> & list ) {
// enter your implementation here
}
template <typename Object>
SingleList<Object>::~SingleList() { // destroy()
// enter your implementation here
}
template <typename Object>
int SingleList<Object>::size() const {
// enter your implementation here
return 0;
}
template <typename Object>
bool SingleList<Object>::empty() const {
// enter your implementation here
return true;
}
template <typename Object>
Object SingleList<Object>::front() const {
// enter your implementation here
return Object();
}
template <typename Object>
Object SingleList<Object>::back() const {
// enter your implementation here
return Object();
}
template <typename Object>
SingleNode<Object> * SingleList<Object>::head() const {
// enter your implementation here
return 0;
}
template <typename Object>
SingleNode<Object> * SingleList<Object>::tail() const {
// enter your implementation here
return 0;
}
template <typename Object>
bool SingleList<Object>::member( const Object & obj ) const {
// enter your implementation here
return false;
}
template <typename Object>
void SingleList<Object>::push_front( const Object & obj ) { // no return type
// enter your implementation here
}
template <typename Object>
void SingleList<Object>::push_back( const Object & obj ) { // no return type
// enter your implementation here
}
template <typename Object>
Object SingleList<Object>::pop_front() {
// enter your implementation here
return Object();
}
template <typename Object>
bool SingleList<Object>::remove( const Object & obj ) {
// enter your implementation here
return false;
}
#endif