/***************************************** * 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 DIRECTED_ACYCLIC_GRAPH_H #define DIRECTED_ACYCLIC_GRAPH_H #ifndef nullptr #define nullptr 0 #endif #include "ece250.h" #include "Exception.h" #include #include #include class Directed_acyclic_graph { private: // whatever you want... // this includes other private functions public: Directed_acyclic_graph( int = 10 ); Directed_acyclic_graph( Directed_acyclic_graph const & ); ~Directed_acyclic_graph(); void swap( Directed_acyclic_graph & ); Directed_acyclic_graph &operator=( Directed_acyclic_graph ); int in_degree( int ) const; int out_degree( int ) const; int edge_count() const; bool adjacent( int, int ) const; bool connected( int, int ) const; void topological_sort() const; bool set_priority( int, double ); bool insert_edge( int, int ); void clear_edges(); void reset_priorities(); friend std::ostream &operator<<( std::ostream &, Directed_acyclic_graph const & ); }; void Directed_acyclic_graph::swap( Directed_acyclic_graph &dag ) { // Swap all your member variables } Directed_acyclic_graph &Directed_acyclic_graph::operator=( Directed_acyclic_graph rhs ) { swap( rhs ); return *this; } // whatever you want... // You can modify this function however you want: it will not be tested std::ostream &operator<<( std::ostream &out, Directed_acyclic_graph const &list ) { out << "#"; return out; } // Is an error showing up in ece250.h or elsewhere? // Did you forget a closing '}' ? #endif