Plzzzzzz Help me out guys... urgent!!!!

Discussion in 'Software' started by lg101, Mar 24, 2006.

  1. lg101

    lg101 Private E-2

    hey guys i have a c program problem....

    i hav a directed graph and my requirement is that program should generate all possible paths form every other node....


    plzzzzzzzzz guys help me out....
     
  2. BrokenArrows

    BrokenArrows Sergeant

    You need to give alot more information than that if you want any help and noone is going to do the project for you.
     
  3. Maxwell

    Maxwell Folgers

    Here are some guidelines to help you; I won’t provide complete information here as I expect that your tutor will have taught you the techniques for developing a program. Basically, you need to follow these steps:

    1) Formalise your problem as an algorithm.
    2) Design your program.
    3) Construct the code.
    4) Compile and build your code.
    5) Construct test cases to go through the paths in your code.
    6) Construct test cases to test the extent or functionality of your algorithm.

    Ideally after each step you should have someone independently review the item to ensure correctness and to minimise problems in the following steps. The end product should be a fully designed, coded and tested quality product. You can also create a user guide, training material, package your program, create an automated installation script and an automated deployment test.

    For step 1, consider how to represent a directed graph in a format that a computer could understand it, e.g., a matrix showing the number of paths from the nodes to the other nodes. Then consider how to calculate the paths from this representation. Continue this until you have sufficient detail so that you have defined a directed graph and an algorithm for calculating all the paths. Standard texts on graph or net theory will help you here.

    For step 2, the basic construction for a program is a) initialisation, b) read some input, c) perform calculations and d) output the results. Step b) can be expanded as: read input values and then check each value as you read to see if it is valid, output meaningful diagnostic messages where errors or warnings are detected. Step c) also expands and essentially encapsulates your method from step 1 but taking account of exceptions and problems that may occur, etc., etc., etc. In other words you are formulating a design for your program in top-down structured manner - this should be documented. If you were using C++ then you would be thinking of objects and designing procedures to be encapsulated with each object.

    For step 3), take account of code standards, neatness, comments, etc. etc.

    For step 5), develop test cases that go through positive (successful cases) and negative (failure cases) to test the logic and robustness of your code. You can use tools or mark the code up using macros to determine coverage. These tests are pure academic examples that don’t necessarily relate to solving a particular directed graph problem. To simplify testing you should consider automating your tests so that they are repeatable.

    For step 6), you are developing functional tests that test a variety of scenarios not just to test a particular code path but to exercise the extent and limitations of your functionality. These are likely to relate to a defined set of directed graph problems.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds