A project is comprised of one or more sequential phases. Each phase is comprised of one or more
tasks. Each phase must be completed before the next one can begin. However, the different tasks
belonging to a single phase can be carried out concurrently. The time it takes to complete a phase
is the time needed to complete the longest task in that phase.
You are to write a program that analyzes the phases of a project and provides a summary of the
timeframes for the phases and the entire project.
The program will read the information regarding the project phases and tasks from an input file.
The output of the program should be directed to the standard output device.
You are to create a test input file using a standard text editor. Each line of the file contains an
phase number, a task number, and the number of days required to complete the task. All values
should be integers and the values on each line should be separated by a space.
The data are stored such that all the tasks for phase 1 are followed by all the tasks for phase 2,
and so on. A typical data file for a project might contain the following data:
1 100 6
1 110 4
2 120 5
3 130 4
3 140 1
4 150 2
4 160 3
4 170 3
5 180 2
5 190 12
6 200 5
So, for example, phase 3 for this project is comprised of two tasks. The time needed to complete
phase 3 is four days (the length of the longest task for phase 3).
The output should look something like this.
The program should print a project timetable summary that lists each phase number, a count of
the number of tasks within the phase, the maximum number of days for a task within the phase,
and the total number of days for the project completion. An example might be:
PROJECT COMPLETION TIMETABLE
PHASE NUMBER OF TASKS MAX TASK LENGTH
----- --------------- ---------------
1 2 6
2 1 5
3 2 4
4 3 3
5 2 12
6 1 5
Days for project completion: 35
Oh yea I am using C++, and as of right now I'm not allowed to use anything but loops or if/elses. So no arrays.
Here is what I have so far can someone steer me in the right direction?
using namespace std;
int counter = 0;
int sum = 0;
As of right now everything is in place, but the data it is printing out is wrong. The output should only have one number of each phase. If there are 2 or more phase number it should display the number of phases in the second column instead of the task number. For the last column if there is more then one of the same phase it should print out the larger max task length of the 2. I missing steps to get to the output but I don't know where to even start.