Вы находитесь на странице: 1из 12

SOFTWARE ENGINEERING

DIGITAL ASSIGNMENT 1
NAME: Amitabh Mishra
Reg.no: 18BCI0225

Q1. For the data set given, create an Activity on Node diagram. Perform
Forward and Backward Pass to calculate Earliest Start, Earliest Finish, Latest
Start, Latest Finish, Float, Free Float and Interfering Float value for each of the
activities. Identify if there is any critical path in the network and highlight the
critical activities. Use the lucidchart tool to draw the diagram.

ANSWER:

Activity Immediate Predecessors Duration


A - 7
B A 8
C A 10
D A 6
E A 2
F B,C 5
G F,D 8
H E 7
I F 5
J I,G,H 2
Edge Node1 → Node2
A 1→2
B 2→3
C 2→4
D 2→5
E 2→6
d 3→4
F 4→7
G 5→8
H 6→8
d 7→5
I 7→8
J 8→9

From the above tables, we can make out the critical path which is:
1 -> 2 -> 4 -> 7 -> 5 -> 8 -> 9
And also the critical activities which are:
A, C, F, D, G, J
And the total project time is:
32
• Here are the calculated Earliest start, Earliest finish, Latest start, Latest
Finish, Float, Free Float and the Interfering Float values.

Earliest Latest Total


Earliest Latest
time time Float Independen
Durat time time Free Float
Activ Finish Start t Float
ity
ion ( (
Start E L Finish (
Lj-
( )
() ( ) ) ) ( ) ( ) ( ) ( )
Ej-Ei -tij
(i,j) Ei+tij Lj-tij Ej-Li -tij
(1)
tij
(2)
Ei
(3)
j i
Lj
(6)
)
(7)=(3)+( (8)=(6)- tij -Ei
(10)=((4)-
(3))-(2)
(11)=((4)-
(4) (5) 2) (2) (9)=(8)- (5))-(2)
(3)
2-3 8 7 15 7 17 15 9 2 0 0
2-5 6 7 22 7 22 13 16 9 9 9
2-6 2 7 9 7 23 9 21 14 0 0
3-4 0 15 17 17 17 15 17 2 2 0
6-8 7 9 30 23 30 16 23 14 14 0
7-8 5 22 30 22 30 27 25 3 3 3
https://app.lucidchart.com/documents/view/76ae21f4-5a3e-42af-a472-d29bfc18fcaa/0_0
Q2. Write a program to calculate Net Profit, ROI, Payback Period, NPV and
Internal Rate of Return (IRR) for the following projects considering the discount
rate of 15%. Use any online software/tool to calculate IRR and generate the
output.

ANSWER:
CODE:
#include<iostream>
#include<stdio.h>
#include<math.h>

int main()
{int x,y,i,j,k,a[5][10];
float netprofit[5],avgprofit[5],roi[5];
double discountfactor[5][10],discountedcashflow[5][10],npv[5];
std::cout<<"\nEnter the number of projects\n";
std::cin>>x;
std::cout<<"\nEnter the number of years\n";
std::cin>>y;
for(i=0;i<x;i++)
{ std::cout<<"\n Enter the cash flow for project "<<i;
std::cout<<"\n Enter the initial investment ";
std::cin>>a[i][0];
for(j=1;j<=y;j++)
{ std::cout<<"\n Enter the value for year "<<j<<" ";
std::cin>>a[i][j];
}
}
for(i=0;i<x;i++)
{ netprofit[i]=0;
for(j=1;j<=y;j++)
netprofit[i]+=a[i][j];
netprofit[i]-=a[i][0];
}

for(i=0;i<x;i++)
std::cout<<"Net profit for project "<<i+1<<" is "<<netprofit[i]<<"\n";

for(i=0;i<x;i++)
{ avgprofit[i]=netprofit[i]/y;
std::cout<<"\n Average annual profit for project "<<i+1<<" is "<<avgprofit[i];
}
for(i=0;i<x;i++)
{ roi[i]=(avgprofit[i]/a[i][0])*100;
std::cout<<"\n ROI for project "<<i+1<<" is "<<roi[i];
}

for(i=0;i<x;i++)
{ std::cout<<"\n \nDiscount factors for project "<<i+1<<"\n";
for(j=0;j<=y;j++)
{ double x=pow(1.15,j);
discountfactor[i][j]=1/x;
std::cout<<"\n Discount factor for year "<<j<<" is "<<discountfactor[i][j];
}
}

for(i=0;i<x;i++)

{ for(j=0;j<=y;j++)
{
discountedcashflow[i][j]=discountfactor[i][j]*a[i][j];
}
}
for(i=0;i<x;i++)
{ npv[i]=0;
for(j=1;j<=y;j++)
npv[i]+=discountedcashflow[i][j];
npv[i]=npv[i]-discountedcashflow[i][0];
std::cout<<"\n NPV for project "<<i+1<<" is "<<npv[i];
}

return 0;
}
OUTPUT:

Net profit for project 1 is 45000

Net profit for project 2 is 80000

Net profit for project 3 is 175000

Average annual profit for project 1 is 7500

Average annual profit for project 2 is 13333.3

Average annual profit for project 3 is 29166.7

ROI for project 1 is 4.28571

ROI for project 2 is 8.88889

ROI for project 3 is 10.4167

Discount factors for project 1

Discount factor for year 0 is 1

Discount factor for year 1 is 0.869565

Discount factor for year 2 is 0.756144

Discount factor for year 3 is 0.657516


Discount factor for year 4 is 0.571753

Discount factor for year 5 is 0.497177

Discount factor for year 6 is 0.432328

Discount factors for project 2

Discount factor for year 0 is 1

Discount factor for year 1 is 0.869565

Discount factor for year 2 is 0.756144

Discount factor for year 3 is 0.657516

Discount factor for year 4 is 0.571753

Discount factor for year 5 is 0.497177

Discount factor for year 6 is 0.432328

Discount factors for project 3

Discount factor for year 0 is 1

Discount factor for year 1 is 0.869565

Discount factor for year 2 is 0.756144


Discount factor for year 3 is 0.657516

Discount factor for year 4 is 0.571753

Discount factor for year 5 is 0.497177

Discount factor for year 6 is 0.432328

NPV for project 1 is -


50563.7

NPV for project 2 is -16748.3

NPV for project 3 is -


22773.6

...Program finished with exit code 0

Press ENTER to exit console.

NET PROFIT
Net profit for project 1 is 45000

Net profit for project 2 is 80000

Net profit for project 3 is 175000

ROI
ROI for project 1 is 4.28571

ROI for project 2 is 8.88889

ROI for project 3 is 10.4167


NPV
NPV for project 1 is 50563.7

NPV for project 2 is 16748.3

NPV for project 3 is 22773.6

INITIAL RATE OF RETURN FOR PROJECT 1


INITIAL RATE OF RETURN FOR PROJECT 2
INITIAL RATE OF RETURN FOR PROJECT 3

Вам также может понравиться