Question: Classes to be created SimpleGraph.cpp SimpleNode.cpp Member numNodes of type int to store total (i) nodeld of type int to store id of a Data

 Classes to be created SimpleGraph.cpp SimpleNode.cpp Member "numNodes" of type int

Classes to be created SimpleGraph.cpp SimpleNode.cpp Member "numNodes" of type int to store total (i) "nodeld" of type int to store id of a Data number nodes node object. "numEdges" of type int to store total (ii)"NeighborCount" of type int to store number of edges count neighbors of that node. "allnodes" An array of type "SimpleNode" (iii)An Array, named "arrNeighbors", of to store all the created nodes type "SimpleNode" to store the neighbors of each a node. Member Overloaded Constructor to initialize the Constructor to initialize the member Functions member data. A message should be printed data. A message should be printed for for this action. this action. Overloaded Constructor: to initialize the private members Destructor to drop the graph object. A Destructor to drop the node object. A message should be printed for this action. message should be printed for this action. Name: addNode() Name: addEdge() Parameter: nodeld Parameter: const SimpleNode& n Return Type: void Return Type: void Purpose: creates an object of type Purpose: adds an edge between caller SimpleNode and assign nodeld to object and a node passed as parameter, An edge is stored in "arrNeighbors" Name: addEdge() Name: getneighborcount() Parameter: nodeidl, nodeid? Parameter; None Return Type: void Return Type: int Purpose: To get the objects of An edge Purpose: to get the count of neighbor against Node id's from SimpleNode array, and call addEdge() of SimpleNode class Name: printNeighbors() Name: getneighbor() Parameter: Node id Parameter: None Return Type: none Return Type: SimpleNod type Purpose: prints all the neighbors of an Purpose: to get the arrneighbor input nodes. Name: printGraphData() Create setter and getter functions for the Parameter: none private data members Return Type: none Purpose: prints all the nodes along with their neighbors.[*Hint: you can use print neighbor functionality

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!