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.
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.
Comment