0 Replies - 2791 Views - Last Post: 07 December 2012 - 01:43 PM Rate Topic: -----

#1 sanghai45   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 20-November 11

Resource Dependency Program?

Posted 07 December 2012 - 01:43 PM

There is a list of nodes and edges like





The first line says that there is a link from a node called "A" to a node called 'B". This means for a A to be a useable, it relies on the resource B.

Write a program that should work with any amount of nodes and any amount of links between them. Where you should represent nodes with a Node class, and the set of links for a single node using an STL container of your choice.

Your program should loop and display two items on the screen. The first is a current view of the graph. Secondly, you should list each node and whether it is usable or not. For any current node, if any of the nodes it relies on get deleted that node becomes unusable.

Your code should be modular so that N number of Resources can be checked.

Help is needed in solving this problem .. What does it want

class Node {

std::vector<?>Edges ;


I am not understand what does this program exactly needs me to do ? and how should I make it modular ?

Is This A Good Question/Topic? 0
  • +

Page 1 of 1