New Question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vrx
    New Member
    • Jul 2007
    • 1

    New Question

    A critical-path analysis is a technique used to determine the schedule for a project. This information
    is important in the playing stages before a project is begun, and it is also useful to evaluate the
    progress of a project that is partially completed. One method for this analysis starts by dividing a
    project into sequential events and then dividing each event into various tasks. Although one event
    must be completed before the next one is started, various tasks within an event can occur
    simultaneously. The time it takes to complete an event, therefore, depends on the number of days
    required to finish its longest tasks. Similarly, the total time it takes to finish a project is the sum of
    the time it takes to finish each event.
    Assume that the critical-path information for a major construction project has been stored in a data
    file named “project.dat” as atable consist of 3 data columns . Each line of the data file contains an
    event number, a task number, and the number of days required to complete the task. The data have
    been stored such that all the tasks data for event 1 are followed by all the tasks data for event 2,


    Write a C++ program that uses “project.dat” file to store the critical-path information for a given
    construction project. Your program should repeatedly display the following menu.
    1- Display all Tasks
    2- Find the event with longest duration
    3- Compute the time to finish a given event
    4- Compute project completion time
    5- Add new task
    6- Exit program
    When the user selects option 6, your program must ask the user to confirm whether he/she actually
    wants to exit the program. Your program must include at least the following functions:
    1) DisplayMenu: Prints the menu, and verifies and returns the user’s choice.
    2) displayAllTasks : Displays the list of all tasks in a readable tabular format as shown the sample
    run below.
    3) computeLongestE vent: returns the event number for the event with the longest duration (i.e.,
    the event with the most time consuming task).
    4) computeEventTim e: receives the event number for a given event as an input parameter, and
    returns the time needed to complete the specified event .
    5) computeProjectT ime: returns the total number of days needed for the project completion.
    6) addNewTask: receives event number, task number and number of days needed to complete a
    new task as input parameters. It adds the information for a new task to the end of
    “project.dat” file.


    Please help me.



    
    Last edited by sicarie; Jul 25 '07, 02:56 PM. Reason: Duplicate letters where not necessary are annoying.
  • ilikepython
    Recognized Expert Contributor
    • Feb 2007
    • 844

    #2
    Originally posted by vrx
    A critical-path analysis is a technique used to determine the schedule for a project. This information
    is important in the playing stages before a project is begun, and it is also useful to evaluate the
    progress of a project that is partially completed. One method for this analysis starts by dividing a
    project into sequential events and then dividing each event into various tasks. Although one event
    must be completed before the next one is started, various tasks within an event can occur
    simultaneously. The time it takes to complete an event, therefore, depends on the number of days
    required to finish its longest tasks. Similarly, the total time it takes to finish a project is the sum of
    the time it takes to finish each event.
    Assume that the critical-path information for a major construction project has been stored in a data
    file named “project.dat” as atable consist of 3 data columns . Each line of the data file contains an
    event number, a task number, and the number of days required to complete the task. The data have
    been stored such that all the tasks data for event 1 are followed by all the tasks data for event 2,


    Write a C++ program that uses “project.dat” file to store the critical-path information for a given
    construction project. Your program should repeatedly display the following menu.
    1- Display all Tasks
    2- Find the event with longest duration
    3- Compute the time to finish a given event
    4- Compute project completion time
    5- Add new task
    6- Exit program
    When the user selects option 6, your program must ask the user to confirm whether he/she actually
    wants to exit the program. Your program must include at least the following functions:
    1) DisplayMenu: Prints the menu, and verifies and returns the user’s choice.
    2) displayAllTasks : Displays the list of all tasks in a readable tabular format as shown the sample
    run below.
    3) computeLongestE vent: returns the event number for the event with the longest duration (i.e.,
    the event with the most time consuming task).
    4) computeEventTim e: receives the event number for a given event as an input parameter, and
    returns the time needed to complete the specified event .
    5) computeProjectT ime: returns the total number of days needed for the project completion.
    6) addNewTask: receives event number, task number and number of days needed to complete a
    new task as input parameters. It adds the information for a new task to the end of
    “project.dat” file.


    plz help meeeeeeeeeeeeee eeeeeeeeeeeeee ):



    
    VRX, please do not post questions in other people's threads and definately check out the posting guidelines.
    Sorry about that joeschnell.

    Comment

    • sicarie
      Recognized Expert Specialist
      • Nov 2006
      • 4677

      #3
      Thread is split, however ilikepython is correct in pointing you to the Posting Guidelines - you have violated several rules such as not trying it yourself, thread hijacking, etc... So I will leave you with our canned response



      The experts on this site are more than happy to help you with your problems but they cannot do your assignment/program for you. Attempt the assignment/program yourself first and post questions regarding any difficulties you have or about a particular function of the code that you don't know how to achieve.

      Please read the Posting Guidelines and particularly the Coursework Posting Guidlines.

      Then when you are ready post a new question in this thread.

      MODERATOR

      Comment

      • ravenspoint
        New Member
        • Jul 2007
        • 111

        #4
        This person is lost, and you guys beat him over the head with rules and regulations? Relax!

        VRX, the first thing you need to think about is how you are gong to store the data in project.dat. Do you have any ideas so far?

        Comment

        • weaknessforcats
          Recognized Expert Expert
          • Mar 2007
          • 9214

          #5
          Originally posted by ravenspoint
          This person is lost,....
          Yes. And I bet no one knows what critical path means.

          Comment

          • JosAH
            Recognized Expert MVP
            • Mar 2007
            • 11453

            #6
            Originally posted by weaknessforcats
            Yes. And I bet no one knows what critical path means.
            You lost, I do ;-) Think of a project with several activities as a directed graph.
            The vertexes are the start/end points of activities, the edges are the activities
            and their duration. Think of a project such as building a house: foundation
            first, floors and walls next; electricity and gas can go simultaneously etc. etc.

            Define two times per vertex: first possible start time and last possible end time.
            The path from the start of the project to the end of the project that violates these
            constraints is the 'critical path', i.e. when anything on that path takes longer
            than planned, the entire project will take longer. google for 'PERT'.

            kind regards,

            Jos

            Comment

            • ravenspoint
              New Member
              • Jul 2007
              • 111

              #7
              Originally posted by weaknessforcats
              Yes. And I bet no one knows what critical path means.
              You would lose that bet.

              My first job, fresh faced with a shiny new Operational Research postgraduate degree, was to do a CP analysis of a new coal mine. Of course, the real benefit was not in the CP itself, but in forcing all those mining engineers to sit down and explain to me in painful detail how they went about digging a coal mine. "But," I asked, "wouldn't it make more sense to let the concrete floor set, before you build the scaffolding?" Once they recovered from the embarrassment they were nice enough to credit me with saving a week off the project duration and thus a million dollars - which helped no end when my six month probationary review came around.

              Comment

              • weaknessforcats
                Recognized Expert Expert
                • Mar 2007
                • 9214

                #8
                I am still winning the bet.

                The critical path is the sequence of tasks from project start to project end that have zero float time.

                Comment

                • JosAH
                  Recognized Expert MVP
                  • Mar 2007
                  • 11453

                  #9
                  Originally posted by weaknessforcats
                  I am still winning the bet.

                  The critical path is the sequence of tasks from project start to project end that have zero float time.
                  You lost! You said the secret f-word first! neener-neener-neener! ;-)

                  kind regards,

                  Jos

                  Comment

                  • weaknessforcats
                    Recognized Expert Expert
                    • Mar 2007
                    • 9214

                    #10
                    Originally posted by JosAH
                    secret f-word first...
                    ??

                    Let's see I used two f-words:

                    from
                    float

                    These look pretty inocuous.

                    Comment

                    Working...