Generate a class node that contains an integer id, C/C++ Programming

Generate a class node that contains an integer id, a position (x, y)  and a vector of 0 <= n <= 5 node pointers (called the connectivity of the node). These node pointers will point at other nodes in the collection. Accepting a user input of  x > 5,  generate a set of  x nodes each with random connectivity n.    Implement an algorithm to search for a path from nodes Ai to Aj where i and j are provided as user input and represent node id values. The solution should display the nodes, who they point at and then  a sequence of node ids beginning with i and terminating with j. If no such path exists then that should be noted. Extra credit will be awarded if the MINIMAL path is always reported.

 

Posted Date: 3/12/2013 1:33:30 AM | Location : United States







Related Discussions:- Generate a class node that contains an integer id, Assignment Help, Ask Question on Generate a class node that contains an integer id, Get Answer, Expert's Help, Generate a class node that contains an integer id Discussions

Write discussion on Generate a class node that contains an integer id
Your posts are moderated
Related Questions
The Switch Construct The switch statement is a multi-way decision-making construct that tests an expression matches one of a number of constant values, and branches accordingly

Q: however shouldn't I always use a printOn() method instead of a friend function? A: No. The usual cause people wish to always use a printOn() method instead of  a friend fu

Problem: (a) What is the main advantage to using a data file? (b) What is meant by opening a data file? How is this accomplished? Illustrate your answer clearly with a sui

2. a) Define a structure to store roll no, name and marks of a student. b) Using the structure of Q2. a), above write a ''C'' program to create a file "student.dat". There must be

write a program in c car booking system

How would I make a maze in C++? I would prefer to use the recursion maze generation algorithm if possible, thanks!

Overloading Unary Operators class sign {int a,b,c; public: sign(){}; sign(int,int,int); void putdata(void); void operator-(); }; void sign::operator-() {a=

It''s that spooky time of year when the dead walk the Earth, things go bump in the night, and the Centers for Disease Control (CDC) recognizes the need for zombie preparedness (

Problem : (a) Stacks can be implemented using arrays. Write down the following C or C++ function to (i) create a stack (ii) add an element to a stack (push). (b) Expl

program that convert take decimal digit and convert it to binart digit