473,386 Members | 1,943 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

New Question

1
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) computeLongestEvent: returns the event number for the event with the longest duration (i.e.,
the event with the most time consuming task).
4) computeEventTime: receives the event number for a given event as an input parameter, and
returns the time needed to complete the specified event .
5) computeProjectTime: 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.




Jul 24 '07 #1
9 3221
ilikepython
844 Expert 512MB
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) computeLongestEvent: returns the event number for the event with the longest duration (i.e.,
the event with the most time consuming task).
4) computeEventTime: receives the event number for a given event as an input parameter, and
returns the time needed to complete the specified event .
5) computeProjectTime: 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 meeeeeeeeeeeeeeeeeeeeeeeeeeee ):




VRX, please do not post questions in other people's threads and definately check out the posting guidelines.
Sorry about that joeschnell.
Jul 25 '07 #2
sicarie
4,677 Expert Mod 4TB
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
Jul 25 '07 #3
ravenspoint
111 100+
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?
Jul 25 '07 #4
weaknessforcats
9,208 Expert Mod 8TB
This person is lost,....
Yes. And I bet no one knows what critical path means.
Jul 25 '07 #5
JosAH
11,448 Expert 8TB
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
Jul 25 '07 #6
ravenspoint
111 100+
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.
Jul 25 '07 #7
weaknessforcats
9,208 Expert Mod 8TB
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.
Jul 25 '07 #8
JosAH
11,448 Expert 8TB
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
Jul 25 '07 #9
weaknessforcats
9,208 Expert Mod 8TB
secret f-word first...
??

Let's see I used two f-words:

from
float

These look pretty inocuous.
Jul 25 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Mohammed Mazid | last post by:
Can anyone please help me on how to move to the next and previous question? Here is a snippet of my code: Private Sub cmdNext_Click() End Sub Private Sub cmdPrevious_Click() showrecord
3
by: Stevey | last post by:
I have the following XML file... <?xml version="1.0"?> <animals> <animal> <name>Tiger</name> <questions> <question index="0">true</question> <question index="1">true</question> </questions>
7
by: nospam | last post by:
Ok, 3rd or is it the 4th time I have asked this question on Partial Types, so, since it seems to me that Partial Types is still in the design or development stages at Microsoft, I am going to ask...
3
by: Ekqvist Marko | last post by:
Hi, I have one Access database table including questions and answers. Now I need to give answer id automatically to questionID column. But I don't know how it is best (fastest) to do? table...
10
by: glenn | last post by:
I am use to programming in php and the way session and post vars are past from fields on one page through to the post page automatically where I can get to their values easily to write to a...
10
by: Rider | last post by:
Hi, simple(?) question about asp.net configuration.. I've installed ASP.NET 2.0 QuickStart Sample successfully. But, When I'm first start application the follow message shown. ========= Server...
53
by: Jeff | last post by:
In the function below, can size ever be 0 (zero)? char *clc_strdup(const char * CLC_RESTRICT s) { size_t size; char *p; clc_assert_not_null(clc_strdup, s); size = strlen(s) + 1;
56
by: spibou | last post by:
In the statement "a *= expression" is expression assumed to be parenthesized ? For example if I write "a *= b+c" is this the same as "a = a * (b+c)" or "a = a * b+c" ?
2
by: Allan Ebdrup | last post by:
Hi, I'm trying to render a Matrix question in my ASP.Net 2.0 page, A matrix question is a question where you have several options that can all be rated according to several possible ratings (from...
3
by: Zhang Weiwu | last post by:
Hello! I wrote this: ..required-question p:after { content: "*"; } Corresponding HTML: <div class="required-question"><p>Question Text</p><input /></div> <div...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.