Sahil
Sahil
Sahil
COMPUTER ENGINEERING
DELHI TECHNOLOGICAL
UNIVERSITY (FORMERLY
Delhi College of Engineering)
Bawana Road, New Delhi 110042
Software Engineering
Lab File
Technology
In
Computer Engineering
Submitted by:
Roll No 2K20/CO/389
Name: SAHIL
KUMAR
Submitted to:
Prof. Rajni Jindal
CONTENTS
S.No. Experiment Pg. No. Date Signature
9. Develop test cases using boundary value analysis for the area 37
of a triangle, factorial of a number n.
Experiment 1
Aim:
Hands-on experience on working with CASE Tools like Meta Edit+, StarUML,
and Rational rose.
Theory:
MetaEdit+:
MetaEdit+ has comprehensive modeling tool features for many users and
projects, and it runs on all major platforms. It retrieves the modeling
language created using MetaEdit+ Workbench from the repository and
automatically follows it.
MetaEdit+ fully supports your language's modeling tools. Your entire team
may quickly begin editing designs as graphical diagrams, matrices, or tables,
moving between views as needed. You may use filters to browse designs,
apply components, link your models to other designs, and test your models
using different predefined or user-defined reports.
StartUML:
StarUML is an open source software modeling tool for system and software
modeling that supports the UML (Unified Modeling Language) architecture. It
is based on UML version 1.4, supports eleven distinct diagram kinds, and
accepts UML 2.0 notation. It aggressively promotes the MDA (Model Driven
Architecture) method by supporting the UML profile idea and generating
code in many languages.
StarUML is designed to be a modular and open tool. It provides frameworks
for expanding the tool's capabilities. It is intended to enable COM Automation
access to all functionalities of the model/meta-model and tool, as well as
menu and option item expansion. Users can also develop their own
techniques and frameworks based on their methodology. The utility may also
be combined with other programmes.
StarUML offers a plethora of advanced capabilities and is far more than a
"basic" diagramming tool. With its MDA (Model Driven Architecture)
capabilities, it is intended at users that use UML intensively and with code
generation goals rather than merely creating diagrams to capture
requirements. However, just utilizing StarUML as a diagramming tool works
good, especially on Windows, because the tool is developed using Delphi and
may run quicker than Java-based tools.
4
Rational Rose:
Rational Rose Software is a collection of visual modeling tools for the
creation of object-oriented models. The practice of graphically portraying the
software system is known as object oriented modeling.
The Rational Rose programme is mostly used to create UML diagrams. It is a
professional tool that is frequently used in industry. During the design phase
of the software development life cycle, rational rose software assists in the
creation of diagrams in academia.
Experiment 2
Aim:
Draw a use case diagram along with a use case description of the project.
Theory:
The purpose of a use case diagram is to capture the dynamic aspect of a
system. But this definition is too generic to describe the purpose.
Use case diagrams are used to gather the requirements of a system
including internal and external influences. These requirements are mostly
design requirements. So when a system is analyzed to gather its
functionalities use cases are prepared and actors are identified. Use case
diagrams are considered for high level requirement analysis of a system. So
when the requirements of a system are analyzed the functionalities are
captured in use cases. Use case diagrams are drawn to capture the
functional requirements of a system.
1. Login:
1.1 Introduction: A passenger can log in the system to book
flight tickets.
1.2 Actors: Passenger, Clerk
1.3 Pre-Conditions: The system must be maintained by the
administrator, and passengers must have an existing
account..
1.4 Post Conditions: If the Use Case is successful, then the
Passenger will be able to do various activities like Book
Ticket,Cancel Ticket
1.5 Basic Flow: If successfully Logged in, then various
activities Book Ticket,Cancel Ticket can Take place.
1.6 Alternative Flows: If login credentials are not working
then the login Error message will pop-up .
1.7 Special Requirements : None
1.8 Use Case Relationship : None
6
3. Book Tickets:
3.1 Introduction: The customer can book tickets.
3.2 Actors: Passenger, Clerk
3.3 Pre-Conditions: The system must be logged in by
the Passenger.
3.4 Post Conditions: If the Use Case is successful, then passengers
can book tickets .
3.5 Basic Flow: If successfully logged in, then various activities
like Book Tickets and Login will occur.
3.6 Alternative Flows: If login credentials are not working then a
login Error message will pop-up or if inadequate balance then
passengers will not be able to book the tickets.
3.7 Special Requirements : None
6. Cancel Tickets:
6.1 Introduction:The passenger can cancel the ticket and get
a refund.
6.2 Actors: Passenger, Clerk
6.3 Pre-Conditions: The system must be logged in by
the Passenger.
6.4 Post Conditions: If the Use Case is successful, tickets will be
canceled and money is refunded.
8
7. Print Tickets
7.1 Introduction: Passengers can print the booked tickets.
7.2 Actors: Passenger.
7.3 Pre-Conditions: The system must be logged in by
the Passenger.
7.4 Post Conditions: If the Use Case is successful, then a report
will be generated .
7.5 Basic Flow: If successfully logged in, then various activities
like check status and Login will occur . If that is successful, then
a report of tickets will be printed.
7.6 Alternative Flows: If login credentials are not working then
login Error message will pop-up or if no tickets booked then
report of tickets will not be printed.
7.7 Special Requirements : None
7.8 Use Case Relationship : None
OUTPUT
Use case diagram for Airline Reservation System :-
9
DISCUSSION
We learnt to make the Use Case diagram of the Airline Reservation System
case study by identifying use cases, A Use Case diagram is an important part
of requirement engineering and in the process of developing one we learnt
how to identify the important functionalities of the project, the users involved
with the application and the relationship between them.
Experiment 3
Aim:
Draw use case diagrams for different domains, like library systems, banking
systems, hospital management systems and hotel management systems.
Theory:
The purpose of a use case diagram is to capture the dynamic aspect of a
system. But this definition is too generic to describe the purpose.
Use case diagrams are used to gather the requirements of a system
including internal and external influences. These requirements are mostly
design requirements. So when a system is analyzed to gather its
functionalities use cases are prepared and actors are identified. Use case
diagrams are considered for high level requirement analysis of a system. So
when the requirements of a system are analyzed the functionalities are
captured in use cases. Use case diagrams are drawn to capture the
functional requirements of a system.
OUTPUT
2. Banking System :
DISCUSSION
We learnt to make the Use Case diagrams of library system, banking
systems, hospital management systems and hotel management system case
study by identifying use cases, A Use Case diagram is an important part of
requirement engineering and in the process of developing one we learnt how
to identify the important functionalities of the project, the users involved
with the application and the relationship between them.
Experiment 4
Aim:
To gain knowledge about ER Diagram and prepare an ER Diagram for Airline
Reservation System.
Theory:
An Entity-Relationship model (ERM) is an abstract and conceptual
representation of data. Entity-relationship modeling is a database modeling
method, used to produce a type of conceptual schema or semantic data
model of a system, often a relational database, and its requirements in a top-
down fashion. Diagrams created by this process are called entity relationship
diagrams, ER diagrams, or ERDs. The building blocks: entities, relationships,
and attributes. An entity may be defined as a thing which is recognized as
being capable of an independent existence and which can be uniquely
identified.
OUTPUT
E-R Diagram for Airline Reservation System :-
15
DISCUSSION
We learnt to make the Entity relationship diagram of the “Airline
Reservation System” case study by identifying the Entities and their
attributes. Also we learnt to identify the relationship between two Entities
and their cardinality.
Experiment 5
Aim:
To gain knowledge about Class Diagrams and prepare a Class Diagram for
the Airline Reservation System.
Theory:
The class diagram is a static diagram. It represents the static view of
an application. Class diagram is not only used for visualizing,
describing and documenting different aspects of a system but also for
constructing executable code of the software application.
The class diagram describes the attributes and operations of a class
and also the constraints imposed on the system. The class diagrams
are widely used in the modeling of object oriented systems because
they are the only UML diagrams which can be mapped directly with
object oriented languages.
The class diagram shows a collection of classes, interfaces,
associations, collaborations and constraints. It is also known as a
structural diagram.
OUTPUT
Class diagram for Airline Reservation System :-
17
DISCUSSION
The purpose of the class diagram is to model the static view of an
application. The class diagrams are the only diagrams which can be
directly mapped with object oriented languages and thus widely
used at the time of construction.
Experiment 6
Aim:
To gain knowledge about Object Diagrams and prepare one for the Airline
Reservation System.
Theory:
Object diagrams are derived from class diagrams so object diagrams
are dependent upon class diagrams.
Object diagrams represent an instance of a class diagram. The basic
concepts are similar for class diagrams and object diagrams. Object
diagrams also represent the static view of a system but this static
view is a snapshot of the system at a particular moment.
So the purpose of the object diagram is to find Object
relationships of a system, Static view of an interaction and
understand object behavior and their relationship from a practical
perspective.
OUTPUT
The Object Diagram for Airline Reservation System :-
19
DISCUSSION
The purpose of an object diagram should be understood clearly to
implement it practically. The purposes of object diagrams are
similar to class diagrams.
The difference is that a class diagram represents an abstract model
consisting of classes and their relationships. But an object diagram
represents an instance at a particular moment which is concrete in
nature.
Experiment 7
Aim:
To gain knowledge about the Data Flow Diagram and draw the level-0 and
level-1 Data Flow Diagram (DFD) for the Airline Reservation System.
Theory:
Data flow diagram is graphical representation of flow of data in an
information system. It is capable of depicting incoming data flow,
outgoing data flow and stored data. The DFD does not mention
anything about how data flows through the system. A DFD shows
what kind of information will be input to and output from the
system, how the data will advance through the system, and where
the data will be stored.
Levels of DFD
● Level 0 - Highest abstraction level DFD is known as Level 0 DFD, which
depicts the entire information system as one diagram concealing all
the underlying details. Level 0 DFDs are also known as context level
DFDs.
● Level 1 - The Level 0 DFD is broken down into more specific, Level 1 DFD. Level
1 DFD depicts basic modules in the system and flow of data among
various modules. Level 1 DFD also mentions basic processes and
sources of information.
DFD Components
DFD can represent Source, destination, storage and flow of
data using the following set of components -
● Entities - Entities are source and destination of information data.
Entities are represented by rectangles with their respective names.
● Process - Activities and action taken on the data are represented by
Circle or Round-edged rectangles.
● Data Storage - There are two variants of data storage - it can either be
represented as a rectangle with absence of both smaller sides or as
an open-sided rectangle with only one side missing.
● Data Flow - Movement of data is shown by pointed arrows. Data
movement is shown from the base of the arrow as its source towards
the head of the arrow as destination.
OUTPUT
Level-0 DFD for Airline Reservation System :-
21
DISCUSSION
We learnt to implement the Level-0 and Level-1 DFD for Library
Management System and the flow of data between various processes
and the repositories in the Library Management System. A data flow
diagram (DFD) maps out the flow of information for any process or
system. It uses defined symbols like rectangles, circles and arrows,
plus short text labels, to show data inputs, outputs, storage points
and the routes between each destination.
Experiment 8
Aim:
Develop code to calculate effort and time period using different forms of
COCOMO Model.
Theory:
COCOMO (Constructive Cost Model) is a regression model based on LOC, i.e., number of Lines
of Code. It is a procedural cost estimate model for software projects and often used as a process
of reliably predicting the various parameters associated with making a project such as size,
effort, cost, time and quality.
The key parameters which define the quality of any software products, which are also an
outcome of the COCOMO are primarily Effort & Schedule:
Schedule: Simply means the amount of time required for the completion of the job, which is, of
course, proportional to the effort put. It is measured in the units of time such as weeks, months.
Types of Models: COCOMO consists of a hierarchy of three increasingly detailed and accurate
forms. Any of the three forms can be adopted according to our requirements. These are types of
COCOMO model:
1. Basic
2. Intermediate
3. Detailed
1. Organic Mode
2. Semi-detached Mode
3. Embedded Mode
CODE
1. Basic Model
23
#include<stdio.h>
#include<conio.h>
#include<math.h>
#include<stdlib.h>
int main()
float effort,time;
float
table[3][4]={2.4,1.05,2.5,0.38,3.0,1.12,2.5,0.35,3.6,1.20,2.5,0.32};
int size,model;
char mode[][15]={"Organic","Semi-Detached","Embedded"};
system("cls");
scanf("%d",&size);
model=0; //organic
model=1; //semi-detached
else if(size>300)
model=2; //embedded
[0]*pow(size,table[model][1]);
24
time=table[model][2]*pow(effort,table[model][3]);
2. Intermediate Model
#include<stdio.h>
#include<conio.h>
#include<math.h>
int main()
{
float table[3][4]={3.2,1.05,2.5,0.38,3.0,1.12,2.5,0.35,2.8,1.20,2.5,0.32};
int i,j,size,model,rating;
char mode[][15]={"Organic","Semi-Detached","Embedded"};
char
driver[15]
[6]={"RELY","DATA","CPLX","TIME","STOR","VIRT","TURN",
"ACAP","AEXP","PCAP",
"VEXP","LEXP","MODP","TOOL","SCED"};
float effort,EAF,a,time;
float costdrivers[15][6]={
{0.75,0.88,1,1.15,1.40,-1},
{-1,0.94,1,1.08,1.16,-1},
{0.70,0.85,1,1.15,1.30,1.65},
{-1,-1,1,1.11,1.30,1.66},
{-1,-1,1,1.06,1.21,1.56},
25
{-1,0.87,1,1.15,1.30,-1},
{-1,0.87,1,1.07,1.15,-1},
{1.46,1.19,1,0.86,0.71,-1},
{1.29,1.13,1.00,0.91,0.82,-1},
{1.42,1.17,1,0.86,0.70,-1},
{1.21,1.10,1,0.90,-1,-1},
{1.14,1.07,1,0.95,-1,-1},
{1.24,1.10,1.00,0.91,0.82,-1},
{1.24,1.10,1,0.91,0.83,-1},
{1.23,1.08,1,1.04,1.10,-1}
};
system("cls");
printf("\nEnter the size of project : ");
scanf("%d",&size);
if(size>=2 && size<=50)
model=0;
else if(size>50 && size<=300)
model=1;
else if(size>300)
model=2;
printf("\nMode = %s",mode[model]);
EAF=1;
for(i=0;i<15;i++)
{
do
{
printf("\nRate cost driver %s on scale of 0-5 : ",driver[i]);
printf("\n0-Very Low\t1-Low\t2-Nominal\t3-High\t4-Very
High\t5-Extra High\n");
26
scanf("%d",&rating);
a=costdrivers[i][rating];
if(a==-1)
{
printf("\nNo value exist for this rating..Enter another
rating...\n");
}
}while(a==-1); if(rating!
=2)
{
EAF=EAF*a;
}
}
printf("\nEAF = %f",EAF); effort=(table[model]
[0]*pow(size,table[model][1])) * EAF; time=table[model]
[2]*pow(effort,table[model][3]); printf("\n\nEffort = %f
Person-Month",effort); printf("\nDevelopment Time = %f
Months",time);
return 0;
}
3. Detailed Mode
#include<stdio.h>
#include<conio.h>
#include<math.h>
int main()
{
float table[3][4]={3.2,1.05,2.5,0.38,3.0,1.12,2.5,0.35,2.8,1.20,2.5,0.32};
int i,j,size,model,rating,size1,S;
27
char mode[][15]={"Organic","Semi-Detached","Embedded"};
char model1[5][25]={"Plan & Requirements","System
Design","Detailed Design",
"Module code & test","Integration & test"};
char
driver[15]
[6]={"RELY","DATA","CPLX","TIME","STOR","VIRT","TURN",
"ACAP","AEXP","PCAP",
"VEXP","LEXP","MODP","TOOL","SCED"};
float effort,a,time,EAF;
float lifecyclephasemu[6][5]={
{0.06,0.16,0.26,0.42,0.16},
{0.06,0.16,0.24,0.38,0.22},
{0.07,0.17,0.25,0.33,0.25},
{0.07,0.17,0.24,0.31,0.28},
{0.08,0.18,0.25,0.26,0.31},
{0.08,0.18,0.24,0.24,0.34},
};
float lifecyclephasetp[6][5]={
{0.10,0.19,0.24,0.39,0.18},
{0.12,0.19,0.21,0.34,0.26},
{0.20,0.26,0.21,0.27,0.26},
{0.22,0.27,0.19,0.25,0.29},
{0.36,0.36,0.18,0.18,0.28},
{0.40,0.38,0.16,0.16,0.30},
};
float costdrivers[15][6]={
{0.75,0.88,1,1.15,1.40,-1},
{-1,0.94,1,1.08,1.16,-1},
{0.70,0.85,1,1.15,1.30,1.65},
28
{-1,-1,1,1.11,1.30,1.66},
{-1,-1,1,1.06,1.21,1.56},
{-1,0.87,1,1.15,1.30,-1},
{-1,0.87,1,1.07,1.15,-1},
{1.46,1.19,1,0.86,0.71,-1},
{1.29,1.13,1.00,0.91,0.82,-1},
{1.42,1.17,1,0.86,0.70,-1},
{1.21,1.10,1,0.90,-1,-1},
{1.14,1.07,1,0.95,-1,-1},
{1.24,1.10,1.00,0.91,0.82,-1},
{1.24,1.10,1,0.91,0.83,-1},
{1.23,1.08,1,1.04,1.10,-1}
};
system("cls");
printf("\nEnter the size of project : ");
scanf("%d",&size);
if(size>=2 && size<=50)
model=0;
else if(size>50 && size<=300)
model=1;
else if(size>300)
model=2;
printf("\nMode = %s",mode[model]);
EAF=1;
for(i=0;i<15;i++)
{
do
{
printf("\nRate cost driver %s on scale of 0-5 : ",driver[i]);
29
printf("\n0-Very Low\t1-Low\t2-Nominal\t3-High\t4-Very
High\t5-Extra High\n");
scanf("%d",&rating);
a=costdrivers[i][rating];
if(a==-1)
{
printf("\nNo value exist for this rating..Enter another
rating...\n");
}
}while(a==-1);
if(rating!=2)
{
EAF=EAF*a;
}
}
printf("EAF : %f",EAF); effort=(table[model]
[0]*pow(size,table[model][1])) * EAF; time=table[model]
[2]*pow(effort,table[model][3]); printf("\nEffort : %f",effort);
printf("\nDevelopment time : %f",time);
printf("\n\nEnter the size equivalent : ");
scanf("%d",&S);
if(S<=26)
{
printf("\nModel : 'Organic Small'"); printf("\
nPhase wise effort distribution is : ");
for(i=0;i<5;i++)
{
printf("\n%s = %f PM",model1[i],effort*lifecyclephasemu[0][i]);
30
}
}
else if(S>26&&S<=50)
{
printf("\nModel : 'Organic Medium'"); printf("\
nPhase wise effort distribution is : ");
for(i=0;i<5;i++)
{
printf("\n%s = %f PM",model1[i],effort*lifecyclephasemu[1][i]);
}
}
else if(S>50&&S<=175)
{
printf("\nModel : 'Semidetached Medium'"); printf("\
nPhase wise effort distribution is : "); for(i=0;i<5;i++)
{
printf("\n%s = %f PM",model1[i],effort*lifecyclephasemu[2][i]);
}
}
else if(S>175&&S<=300)
{
printf("\nModel : 'Semidetached Large'"); printf("\
nPhase wise effort distribution is : "); for(i=0;i<5;i++)
{
printf("\n%s = %f PM",model1[i],effort*lifecyclephasemu[3][i]);
}
}
31
else if(S>300&&S<=450)
{
printf("\nModel : 'Embedded Large'"); printf("\
nPhase wise effort distribution is : ");
for(i=0;i<5;i++)
{
printf("\n%s = %f PM",model1[i],effort*lifecyclephasemu[4][i]);
}
}
else
{
printf("\nModel : 'Embedded extra large'"); printf("\
nPhase wise effort distribution is : "); for(i=0;i<5;i++)
{
printf("\n%s = %f PM",model1[i],effort*lifecyclephasemu[5][i]);
}
}
if(S<=26)
{
printf("\n\nModel : 'Organic Small'");
printf("\nPhase wise development time duration is : ");
for(i=0;i<5;i++)
{
printf("\n%s = %f M",model1[i],time*lifecyclephasetp[0][i]);
}
}
else if(S>26&&S<=50)
{
32
for(i=0;i<5;i++)
{
printf("\n%s = %f M",model1[i],time*lifecyclephasetp[4][i]);
}
}
else
{
printf("\nModel : 'Embedded extra large'"); printf("\n\
nPhase wise development time duration is : ");
for(i=0;i<5;i++)
{
printf("\n%s = %f M",model1[i],time*lifecyclephasetp[5][i]);
}
}
return 0;
}
OUTPUT
1. Basic Mode
2. Intermediate Mode
34
35
3. Detailed Mode
36
Experiment 9
Aim:
Develop test cases using boundary value analysis for the area of a triangle,
factorial of a number n.
Theory:
Boundary Value Analysis (BVA) is a black box software testing technique
where test cases are designed using boundary values. BVA is based on the
single fault assumption, also known as critical fault assumption which states
that failures are rarely the product of two or more simultaneous faults.
Hence while designing the test cases for BVA we keep all but one variable to
the nominal value and allow the remaining variable to take the extreme
value.
While designing the test cases for BVA first we determine the number of
input variables in the problem. For each input variable, we then determine
the range of values it can take. Then we determine the extreme values and
nominal value for each input variable.
CODE
#include <conio.h>
#include <stdio.h>
void main()
{
int a, b, c, result;
printf(" Enter the values of a, b and c : = ");
scanf("%d %d %d", &a, &b, &c);
38
getch();
}
OUTPUT
39
DISCUSSION
40
Experiment 10
Aim:
Develop program to find cyclomatic complexity using dd path for problems
like root of quadratic equation
Theory:
A code section's cyclomatic complexity is a quantitative measure of the
number of linearly independent routes in it. It is a software statistic that is
used to determine the complexity of a programme. It is calculated using the
program's Control Flow Graph. The nodes in the graph represent the smallest
collection of commands in a programme, and a directed edge links the two
nodes, indicating that the second command may immediately follow the first.
CODE
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c,validInput=0,d;
double D;
cout<<"\nEnter the 'a' value : ";
cin>>a;
cout<<"Enter the 'b' value : ";
cin>>b;
cout<<"Enter the 'c' value : ";
cin>>c;
if((a>=0) && (a<=100)&&(b>=0) && (b<=100)&&(c>=0) && (c<=100))
{
validInput=1;
if(a==0)
validInput=-1;
}
42
if(validInput==1)
{
d = b*b - 4*a*c;
if(d == 0)
{
cout<<"\nRoots are equal and are r1 = r2 = "<<(-b)/(2*(float)a);
}
else if(d > 0)
{
D = sqrt(d);
cout<<"\nThe roots are real and are r1 = "<<(-b-D)/(2*a)<<"
and "<<(-b+D)/(2*a);
}
else
{
D = sqrt(-d) / (2*a);
cout<<"\nThe roots are imaginary and are r1 =
("<<-b/(2*a)<<","<<D<<") and r2 = ("<<-b/(2*a)<<","<<-D<<")";
}
}
else if(validInput==-1)
{
cout<<"\nThe values do not constitute a quadratic equation.";
}
else
{
cout<<"\nThe inputs belongs to invalid range.";
}
return 0;
43
OUTPUT
PROGRAM FLOW
44
DD GRAPH
45
Cyclomatic Complexity
In the above DD Path Graph, we can
find Number of Nodes (n) = 19
Number of Edges (e) = 24
Number of Connected Components (P) = 1
(i) V(G) = e – n + 2P = 24 – 19 + 2 = 7
(ii) V(G) = Π + 1 = 6 + 1 = 7 (where Π is the number of predicate nodes
contained in the graph G)
(iii) V(G) = Number of Regions = 7
Therefore, there are 7 independent paths. They are:
1.ABGOQRS
2.ABCDEFG OQRS
3.ABGHIJNRS
4.ABG HIKERS
5.ABGOPRS
6.ABCDEFG OPRS
7.ABGHIKLNRS
DISCUSSION
46
Experiment 11
Aim:
Develop equivalence class test cases for classification of a triangle and
calculating weekdays for a given date and next date.
Theory:
Equivalence Class Testing
In this method, the input domain of a program is partitioned into a
finite number of equivalence classes such that one can reasonably
assume, but not be absolutely sure, that the test of a representative
value of each class is equivalent to a test of any other value.
Two steps are required to implementing this method-
1. The equivalence classes are identified by taking each input
condition and partitioning it into valid and invalid classes. For
example, if an input
condition specifies a range of values from 1 to 999, we identify
one valid equivalence class [1<item<999]; and two invalid
equivalence classes [item<1] and [item>999].
1. CLASSIFICATION OF A TRIANGLE
1 50 50 50 equilateral
2 50 99 100 scalene
48
3 99 50 50 isosceles
1 0 50 50 invalid input
2 50 50 50 equilateral
4 50 50 0 invalid input
5 50 50 50 equilateral
7 50 0 50 invalid input
8 50 50 50 equilateral
10 30 30 30 equilateral
11 30 30 45 isosceles
12 30 35 40 scalene
49
13 30 35 35 isosceles
14 30 35 30 isosceles
15 30 25 55 not a triangle
16 30 55 25 not a triangle
17 55 30 25 not a triangle
18 90 25 40 not a triangle
19 25 40 90 not a triangle
20 40 90 25 not a triangle
DISCUSSION
Strongly typed implementation language; no need for robust forms.
ECT is useful for specific types of data input. The next date
function problem exemplifies how complex functions can aid in
the identification of useful EC.
It is possible that many efforts will be required.
Experiment 12
Aim:
Program to predict reliability metric using different models.
Theory:
A software reliability model indicates the form of a random process that
defines the behavior of software failures to time.
Over 200 models have been established since the early 1970s, but how
to quantify software reliability remains mostly unsolved.
● Assumptions
● Factors
CODE
#include <bits/stdc++.h>
{
cout << "Enter failure intensity at the start of execution\n";
cin >> fi2;
cout << "Enter expected number of failures experienced\n";
cin >> ef2;
cout << "Enter failure intensity delay parameter\n";
cin >> fidp;
cout << "Enter execution time\n";
cin >> et2;
cout << "Current Failure Intensity:" << fi2 * exp(-fidp * ef2) <<
endl;
cout << "Slope of failure intensity function:" << -fidp * fi2 *
exp(-fidp * ef2) << endl;
cout << "No of failures at execution time:" << log((fi2 * fidp * et2)
+ 1) / fidp << endl;
cout << "Failure intensity at execution time:" << fi2 / ((fi2 * fidp *
et2) + 1) << endl;
}
else
cout << "Wrong choice\n";
return 0;
}
OUTPUT
54
DISCUSSION
Software dependability is a crucial component of software quality and an
important study subject. Metrics for software reliability can be used to
evaluate present reliability and project future reliability. The main goal for
any software industry is to achieve software reliability. Because software
tends to be complicated, achieving software reliability can be challenging.
This is due to the tool's implementation of a number of software reliability
techniques, such as complexity metrics-based techniques used in the pre-
test phase, interfailure times-based techniques used in the testing phase,
and architecture-based techniques that can be applied at all stages of
the software life-cycle.
Experiment 13
Aim:
Develop a program to calculate maintenance metrics using different models
Theory:
There are two categories of maintenance key performance indicators which
include the leading and lagging indicators. The leading indicators signal
future events and the lagging indicators follow the past events. The leading
indicator comprises metrics like the Estimated vs actual performance and PM
Compliance, while the lagging indicators are reflected in maintenance
metrics like the Mean Time To Repair (MTTR) , Overall Equipment
Effectiveness OEE and Mean time between failure (MTBF).
Using these maintenance metrics and turning the data into actionable
information, organizations can acquire both qualitative and quantitative
insights.
And there is no better way to spot opportunities for improvement.
Here are some important maintenance metrics you should track if you want
to improve and optimize your maintenance operations.
MTTR is the measure of the repairable items maintainability. The MTTR clock
starts ticking when the repairs start and it goes on until operations are
restored. This includes repair time, testing period, and return to the normal
operating condition.
The goal of every organization is to reduce MTTR as much as possible. This is
especially important for critical assets as every additional hour you need to
restore an asset to a working condition amounts to huge losses for your firm.
To calculate MTTR, you divide the downtime period by the total number of
MTBF is the measure of the predicted time between one breakdown to the
next during normal operation.In essence, MTBF tells you the expected
lifetime for a specific piece of equipment. Higher MTBF means that the part
(or product) you bought will work longer before it experiences failure.If you
know how long a specific part/equipment will last, it gets much easier to
predict and prepare for a failure or schedule some preventive work.
To calculate the MTBF, you divide the total operational time by the
failures)
In this case:
PMC= (51/60) x 100 = 85%
This tells you that 85% of all preventive WO’s have been covered for
selected months. The disadvantage of this metric is that it doesn’t tell
you if the WO’s have been completed on time.That is why you need to
invest some additional effort and also track if the Work Orders are actually
being finished on time.
58
CODE
#include
<iostream> using
namespace std; int
main()
{
float smh, tmh, choice, ava, per, qual, dp, rep, op, fal, pws, pwc;
cout << "1.Planned maintenance percentage\n2.Overall
Equipment Effectiveness\n3.Mean time to repair\n4.Mean time
between failure\n5.Preventive maintenance compliance\nChoose
choice\n ";
cin
>>choice; if
(choice ==
1)
{
cout << "Enter scheduled maintenance
hours\n"; cin >> smh;
cout << "Enter total maintenance
hours\n"; cin >> tmh;
cout << "Planned maintenance percentage=" << smh *
100 / tmh <<
"%\
n";
}
else if (choice == 2)
{
cout << "Enter availabality,performance and
59
{
cout << "Enter sum of downtime
periods\n"; cin >> dp;
cout << "Enter total no.of
repairs\n"; cin >> rep;
cout << "Mean time to repair=" << dp / rep;
}
else if (choice == 4)
{
cout << "Enter sum of operational
time\n"; cin >> op;
cout << "Enter total no.of
failures\n"; cin >> fal;
cout << "Mean time between failure=" << op / fal;
}
else if (choice == 5)
{
cout << "Enter preventive work
scheduled\n"; cin >> pws;
cout << "Enter preventive work
completed\n"; cin >> pwc;
cout << "Preventive maintenance compliance=" << pwc * 100 / pws
<<"%\n";
}
else
cout << "Wrong choice\n";
}
OUTPUT
60
DISCUSSION
The traits of various programming languages can be analysed, contrasted,
and evaluated. while contrasting and assessing the skills and output of
software development teams. The productivity gains and time saved
throughout a project make the time spent setting goals, choosing metrics,
and adopting regular measuring methods worthwhile. Application
performance management (APM) tools are one example of a solution that
combines several software metrics with information and insights on
application utilization, code performance, delayed requests, and more.