[go: up one dir, main page]

0% found this document useful (0 votes)
28 views45 pages

Software Lab Sample

The document is a Software Engineering Laboratory file from Delhi Technological University, focusing on a Payroll Management System. It includes various experiments related to software engineering concepts such as the use of CASE tools, elicitation techniques, and the creation of use case diagrams. The document outlines objectives, requirements, and functionalities of the Payroll Management System, emphasizing user interactions and system behavior.

Uploaded by

asthadahiya2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views45 pages

Software Lab Sample

The document is a Software Engineering Laboratory file from Delhi Technological University, focusing on a Payroll Management System. It includes various experiments related to software engineering concepts such as the use of CASE tools, elicitation techniques, and the creation of use case diagrams. The document outlines objectives, requirements, and functionalities of the Payroll Management System, emphasizing user interactions and system behavior.

Uploaded by

asthadahiya2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

lOMoARcPSD|47654830

Software engineering lab file

Object Oriented Software Engineering (Delhi Technological University)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)
lOMoARcPSD|47654830

DELHI TECHNOLOGICAL UNIVERSITY


(Formerly Delhi College of Engineering) Shahbad
Daulatpur, Bawana Road,
Delhi-110042

Department of Computer Science

Software Engineering Laboratory File


(Payroll Management System)

Submitted To: Submitted By:


Prof. Rajni Jindal Name: - Ankur Aggarwal
Department of Computer Roll No.: - 2K20/CO/077
Science and Engineering

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

INDEX

S.No. Experiment Date Sign.

Hands-on experience on working of CASE Tools like


1
Meta Edit+, StarUML, and Rational rose.
Apply various elicitation techniques for Payroll
2 Management System.

Draw use case diagram for Payroll Management


3
System.

Draw use case diagram along with use case


4
description.

5 Draw the ER Diagram for the Payroll Management


System.

6 Draw different levels of DFD for Payroll Management


System.

7 Convert DFD to structure chart.

Develop c code to calculate effort and time period using


8
different forms of COCOMO model

9 Develop test cases using boundary value analysis for


the area of a triangle, factorial of a number n.

Develop program to find cyclomatic complexity using dd


10
path for problems like root of quadratic equation.

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

Develop equivalence class test cases for classification of


11 a triangle and calculating weekdays for a given date and
next date.
Program to predict reliability metric using different
12
models.

Develop a program to calculate maintenance metrics


13
using different models.

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

Experiment No. 1
Aim
Hands on experience on working of CASE TOOLS like Meta Edit+, StarUML and
Rational Rose.

Theory
1. Meta Edit+: Meta Edit+ enables companies to radically improve development
productivity and quality by generating free code directly from models.
First you design the modelling language with meta edit workbench and
then other developing model in modular.
Meta Edit+ Workbenches: It allows a user to build your own modelling tool without
having to write a single level of code.
Steps to define tool:
a. Concepts: Depending on your domain, the concepts come from the
required output to be generate from product components. In use from
product architecture, from product line characteristics.
b. Rules: Meta Edit+ defines tools inside and between models. For one
modelling language a user can define how its concepts can be
related to each other and connections allowed between each
instance.
c. Symbols: the language concepts their connections and associated
rules are illustrated. A user just draws the symbols and their full
graphical behaviour is provided.
d. Generators: You can make reports which check consistency of
models, produce merits, analyse, model linkages produce
documentation and export models.
Meta Edit Modes:
a. Diagram Editor: Tool for creating, managing, maintaining design
information as diagram with advanced features like reusing elements.
b. Matrix Editor: handles design information as matrices.
c. Table Editor: Tool for providing a tabular or form-based view on design
information.
d. Browsers: Meta Edit+ offers general browser for viewing and editing
repository contents.

2. Star UML: It is a sophistic software modular aimed to support agile and


concise modelling its targets are:
a. Agile and small development teams.
b. Professional persons.

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

I. Project: It is a top-level element stored as a single file. Typically, it is organised by


a set of UML Models.

II. Model and View: It is description of any aspect of software system such as
structure behavior, requirement and so on. A diagram/view element is a visual
geometric symbolic representation of a software model.

III. Fragment: A fragment is a part of a project saved as a separate file with the
extension name. mfj. Any element can be exported as a fragment, but typically
UMLPackage, UMLModel, and UMLSubsystem are the candidates.

IV. Profile: UML (Unified Modeling Language) is a general-purpose modeling


language that could be used to express any kinds of software-intensive systems.
In this reason, using UML for a specific domain or platform is not sufficient, so
you may need to define UML Profile. StarUML provides UML profiles which can
be used to expand UML.

V. Extension: An extension is a package which adds new features to StarUML. For


example, an extension can extend menus, UIs, dialogs, modeling notations,
preferences, etc. An extension can be written in JavaScript, CSS3, and HTML5
and can use Node.js integrated in StarUML.

(3) Rational Rose: It is an extended development environment for feature software


developers, integrates with Microsoft visual studio .NET.

Features: Two popular features of rational rose are its ability to provide
iterative development and round-trip engineering.

Usage:
(i) Rational Rose allows developer to take advantages of iterative
development because new application can be created in stages.

(ii) Rational Rose can perform what is called round trip engineering by
going and updating rest of model.

(iii) User can create activity diagrams. The systems engineering activity diagram
can be taken oriented.

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

Experiment No. 2

Aim:
Apply various elicitation techniques for Payroll Management System.

Theory:
The purpose of this document is to familiarize readers with the software. The
specification describes all hardware and software requirements for the product,
behaviour of it and its components. Software Requirements Specification (SRS) allows
to verify the customer that all his requirements are observed and implemented correctly
by developer.
The intended audience for the SRS reading consists of system end-users (patrons),
customer engineers, software developers.

LIST OF REQUIREMENTS:

1. The employees can easily login the portal by entering their employee id and
password. Also, they can scan at the desired point.

2. The user must link their company banking details with their bank account and
some Identity Card while signing up for the provident fund and tax calculation
system. They need to provide a salary account for the transfer of the salary.

3. The user should be able to make a easily by entering the user id of the recipient
and their PIN code, which they have made while registering on the platform.

4. The login verification system will block the employee if the wrong
password/username is entered more than 3 times.

5. The user should be able to view and challenge his limit on the paid and unpaid
holidays he is left with and shows the regularity of the employee.

6. The history of all attendance, tax/provident fund calculation along with the
attendance criteria made using the platform by the user should be securely
stored and should be visible to the user as well as the administrator.

7. There should be chatbots available for general queries, which will be redirected
to a person if the system can resolve the query.

8. Administrators should be able to set up offers for using the platform for
transactions, which will then be visible to the users and can be claimed by them
if they fulfil the requirements.

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

9. For the tax calculation system, the employee must specify which taxes are to
automatically deduct from the given bank account and also how the provident
fund should be distributed.

OBJECTIVES:

These are some of the basic facilities that the new and updated payroll management
system will provide: -

Login System:

• The login system includes both the internet as well as the scan method available
in the previous system. For scanning the employee has to scan his card at the
desired location so as to record his time stamp.
• The login system will be integrated via the internet using a particular site, where
the employee has to enter his employee details and password (given beforehand)
and this will update the time stamp of that day.

Salary Calculation System: -

• It will calculate the salary of an individual depending upon the department, the
post of the employee, bonuses, and other factors. The main feature of this
software is that it will directly send the salary (including bonuses and more)
directly into the bank of your choice.
• It will be integrated with the attendance tracking software so that it can
automatically deduct the required the after all the holidays and taxes.
• The software will show all the possible increments and decrements in one’s salary
on the day and the employee can also raise a request in case of any
miscalculation or any wrong deductions.

Tax Calculation System: -

• Unlike manual calculations for taxes which can be a mess, the given software will
calculate all the possible taxes that the given employee has to submit during the
specific period.
• These taxes can include home tax, income tax and many more depending upon
which one employee will add to his/her portal.
• These will automatically be deducted from the salary slip and paid to their
respective domains as specified by the employee.

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

Provident Fund System: -

• The following software will check your salary bill and the are added to the desired
PF account of the employee.
• These will be generated at the end of the calculation and it will be calculated on
the predefined algorithm given by a particular company.

Attendance Tracking Software: -

• The following software will track the attendance of the employee which will help
the salary calculation software in the salary calculation. It is integrated with the
login module.
• The Software will be open which means that employee can check his/her
attendance at any point of time so that if there are any faults then it can be
clarified as soon as possible.
• The software will generate an alert at the ending of the month so that each
employee can check his/her attendance.

Self Service Software: -

• The software stores all the holidays (paid and non-paid) and the salary and PF bill
for an employee for a current year and through this the employee can access
their details anytime for a given year.
• The employees can anytime can access the details or print and raise any queries
here.

The Storage Module: -

• The System Will Be Connected to a database which will store the employee slips
and holidays for a given year.
• At the end of each month after all clarifications of the employee salary have been
done the system will send all the data back to the backend for storage and are
stored based on employee name.
• The database access will be restricted and can be accessed by only a few
employees of the company so as to force minimal human misuse or errors.

• Security Management: -

• The system will be highly secured by using high level of encryption and minimal
human requirement for operation. The Encryption Algorithm will be pre-defined and
one of the most secure in the industry.

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

• All of the employee data including his bank details, phone number and many more
will be encrypted before adding to the database so that it cannot be misused by
someone else.

Discussion
The purpose of drawing an SRS is to get an approximate idea of the requirements of
the case study.

Finding And Learning


A Software Requirement Specifications Document has been drawn which now forms
the starting point from where to start strictly identifying the requirements of the case
study.

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

Experiment No. 3

Aim:
Draw Use Case diagram for Payroll Management System.

Theory:
A use case diagram is used to represent the dynamic behaviour of a system. It
encapsulates the system's functionality by incorporating use cases, actors, and their
relationships. It models the tasks, services, and functions required by a system
/subsystem of an application. It depicts the high-level functionality of a system and tells
how the user handles a system.

Purpose of Use Case Diagrams


The main purpose of a use case diagram is to portray the dynamic aspect of a system.
It accumulates the system's requirement, which includes both internal as well as
external influences. It invokes persons, use cases, and several things that invoke the
actors and elements accountable for the implementation of use case diagrams. It
represents how an entity from the external environment can interact with a part of the
system.

Following are the purposes of a use case diagram given below:


1. It gathers the system's needs.
2. It depicts the external view of the system.
3. It recognizes the internal as well as external factors that influence the system.
4. It represents the interaction between the actors.

Following are some rules that must be followed while drawing a use case diagram:
1. A pertinent and meaningful name should be assigned to the actor or a use case of
a system.
2. The communication of an actor with a use case must be defined in an
understandable way.
3. Specified notations to be used as and when required.
4. The most significant interactions should be represented among the multiple no of
5. interactions between the use case and actors.

10

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

11

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

Experiment No. 4

Aim:
Draw Use Case diagram for Payroll Management System along with its use case
description.

Theory:
A use case description is a text-based narrative of a functionality comprised of detailed,
step-by-step interaction between the actor and the system. It describes the outcomes
of an action taken to accomplish a specific goal. It also details different paths that can
be followed by defining primary, alternate, and exception flows. Use cases are written
from the point of view of the actor and avoid describing the internal aspects of the
solution.

1. Use Case Name: Login System

Description:
The login module will allow all the employees of the company to login via their
employee id and the password or by their ID Card for the day. This system will be
used to track the attendance of the employee.

Basic Flow:
The Customer is asked to enter his/her id and password or their can scan their id
card for entering the system. After entering the credentials, the system will cross
check through the data in database via the storage module. In case of any error, they
can retry or try contacting the admin department.

Actor: Customer, Admin

Pre-Condition: All the employees and admin must have their credentials uploaded
on the database

Post Condition: Check for The Confirmation

Related Use Cases: Verify User, Attendance tracking Software, Storage System

Alternative Flow: In case of an invalid id/password a Login Error message will be


displayed and 3 more attempts will be given. In case for further wrong attempts the
login of that employee will be paused.

12

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

2. Use Case Name: Attendance Tracking Software

Description: The following software will track the attendance of the employee as
well of the admin which will help the salary calculation software in the salary
calculation. It is integrated with the login module.

Basic Flow:
This software will initiate as soon as there is a successful login into the system and
will add the required details in the history of the employee automatically. It will then
send the data to the storage module for storage.

Actor: Admin

Pre-Condition: All the admin must have their credentials uploaded on the database.

Post-Condition: None.

Related Use Cases: Login in System, Storage Module

Special Requirements: Admin access card

Alternative Flow: Admin Access card for any errors in the software or any correction
for miscalculation.

3. Use Case Name: Salary Calculation System

Description: It will calculate the salary of an individual depending upon the


department, the post of the employee, bonuses and other factors. The main feature
of this software is that it will directly send the salary (including bonuses and more)
directly into the bank of your choice.

Basic Flow: The given software will take at the ending weeks of each month will take
in effect all the holidays (paid, non-paid) along with other factors and prepare a salary
slip for each employee. Some data from the storage module will be received and
once the slip is created it will send the required data to the storage module which will
store it in the database and will send it to their respective mails at the required time.

Actor: Admin

Pre-Condition: All the admin must have their credentials uploaded on the database.

Post-Condition: None.

Related Use Cases: Attendance tracking Software

Alternative Flow: None

13

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

Special Requirements: Admin access card for any errors in salary calculation or
machine error.

4. Use Case Name: Self Service System

Description: The software stores all the holidays (paid and non-paid) and the salary
and PF bill for an employee for a current year and through this the employee can
access their details anytime for a given year. The employees can anytime can
access the details or print and raise any queries here.

Basic Flow: After verifying his/her details the employee can access his records,
salary slips and his attendance for the past month. After entering the credentials, the
system will cross check through the data in database via the storage module Along
with it the employee can raise any query that he/she founds to be confusing in the
system and the query will be send to the required department for clarifications.

Actor: Employee, Admin

Pre-Condition: All the employees and admin must have their credentials uploaded
on the database

Post-Condition: Logout of The System.

Related Use Cases: Storage Module, Verify User

Special Requirements: None

Alternative Flow: In case of an invalid id/password a Login Error message will be


displayed and 3 more attempts will be given. In case for further wrong attempts the
login of that employee will be paused

5. Use Case Name: Storage Module

Description: The System Will Be Connected to a database which will store the
employee slips and holidays for a given year. The database access will be restricted
and can be accessed by only a few employees of the company so as to force
minimal human misuse or errors.

Basic Flow: The software on running will ask for verification of the employee of the
admin department. Then it will ask for the employee id of the user whose data has to
be fetched and related operations can be performed. Also, once a employee is
logged in the system or an pay slip is generated the storage module will be contacted
by the other module for storage purposes.

14

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

Actor: Admin

Pre-Condition: All the admins must have their credentials uploaded

Post-Condition: Logout of The System.

Related Use Cases: Login System, Attendance Software, Salary Calculation

Alternative Flow: In case of an invalid id/password a Login Error message will be


displayed and 3 more attempts will be given. In case for further wrong attempts the
login of that admin will be paused and then a mail has to be written to the head of
admin for change in password or temporarily log-in access.

Special Requirements: Admin Access Card

6. Use Case Name: Provident Fund System

Description: The following software will check your salary bill and they are added to
the desired PF account of the employee. These will be generated at the end of the
calculation and it will be calculated on the predefined algorithm given by a particular
company.

Basic Flow: At the end of each month the software will generate the provident fund
for the employees depending upon his/her level of responsibility. It will then contact
the salary module for the final changes and later stored in the database.

Actor: Customer, Admin

Pre-Condition: The employees and admins must have their credentials uploaded on
the database

Post-Condition: Logout of The System.

Alternative Flow: In case of any failed transaction or timeout error the screen will
refresh cancelling all the ongoing transaction. The whole process has to be done
again.

Special Requirements: Detail Of bank via which transaction has to be completed


(3rd party based). In case of any error that need attention then the admin access
card is required for any such errors.

7. Use Case Name: Tax Calculation System

Description: Unlike manual calculations for taxes which can be a mess, the given
software will calculate all the possible taxes that the given employee has to submit

15

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

during the specific period. These taxes can include home tax, income tax and many
more depending upon which one employee will add to his/her portal.

Basic Flow: After the verification of user, the software will ask for the list of taxes to
be paid by the employee and will ask whether to deduct from the current salary or
any existing account of the employee. After the successful transaction a e-slip will be
generated.
Actor: Customer, Admin

Pre-Condition: The employee and admins must have their credentials uploaded on
the database

Post-Condition: Logout of The System

Related Use Cases: Storage System

Alternative Flow: In case of any failed transaction or timeout error the screen will
refresh cancelling all the ongoing transaction. The whole process has to be done
again.

Special Requirements: Detail Of bank via which transaction has to be completed


(3rd party based). In case of any error that need attention then the admin access
card is required for any such errors.

Findings and Learnings

Use case descriptions can be used:

1. To further refine use case diagrams.


2. To supplement or decompose a user story.
3. To communicate what the system will be used for to the development and
testing teams.
4. To elicit suggestions from the development team on technical constraints.
5. To show a sequential flow of events for a proposed solution.
6. To give stakeholders an opportunity to see if the narrative aligns with their
expectations.
7. To provide a framework for testing.

16

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

Experiment No. 5

Aim:
Draw Entity Relationship diagram for Payroll Management System.

Theory:
An Entity-Relationship model (ERM) is an abstract and conceptual representation of
data. Entity- relationship modelling is a database modelling 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.

1. ENTITY: An entity may be a physical object such as a house or a car, an event


such as a house sale or a car service, or a concept such as a customer transaction
or order. Entities can be thought of as nouns. Examples: a computer, an employee, a
song, a mathematical theorem. Entity sets are drawn as rectangles, relationship sets
as diamonds. If an entity set participates in a relationship set, they are connected
with a line.

2. RELATIONSHIP: A relationship captures how two or more entities are related to


one another. Relationships can be thought of as verbs, linking two or more nouns.
Examples: A performs relationship between an artist and a song, a proved relationship
between a mathematician and a theorem. Relationships illustrate how two entities
share information in the database structure.

3. ATTRIBUTES: Attributes are drawn as ovals and are connected with a line to exactly
one entity or relationship set. Key attribute is the unique, distinguishing characteristic
of the entity. For example, an employee's social security number might be the
employee's key attribute.

4. CARDINALITY: Cardinality specifies how many instances of an entity relate to one


instance of another entity. Cardinality is also closely linked to cardinality. While
cardinality specifies the occurrences of a relationship, Cardinality describes the
relationship as either mandatory or optional. In other words, cardinality specifies the
maximum number of relationships and Cardinality specifies the absolute minimum
number of relationships.

17

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

FINDINGS AND LEARNINGS


Using entity relationship diagram to represent data is an important technique. It
should not be used in isolation, but together with techniques that fully represent the
business object.

18

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

Experiment No. 6

Aim:
Draw different levels of DFD for Payroll Management 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 a rectangle 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 arrow as its source towards head of the arrow as destination.

19

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

Diagram

Level 0

Level 1

Findings and Learnings

With a data flow diagram, users are able to visualize how the system will operate, what
the system will accomplish, and how the system will be implement.

20

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

Experiment No. 7

Aim:
Convert DFD of Payroll Management System into structured chart.

Theory:
Structure Chart represent hierarchical structure of modules. It breaks down the entire
system into lowest functional modules, describe functions and sub-functions of each
module of a system to a greater detail. Structure Chart partitions the system into black
boxes functionality of the system is known to the users but inner details are unknown).
Inputs are given to the black boxes and appropriate outputs are generated.
Modules at top level called modules at low level. Components are read from top to
bottom and left to right. When a module calls another, it views the called module as
black box, passing required parameters and receiving results.

Findings and Learnings


A structure chart depicts
• the size and complexity of the system, and
• number of readily identifiable functions and modules within each function and
• whether each identifiable function is a manageable entity or should be broken down
into smaller components.
The representation describes the breakdown of the configuration system into
subsystems and the lowest manageable level. An accurate and complete structure
chart is the key to the determination of the configuration items (CI), and a visual
representation of the configuration system and the internal interfaces among its CIs.

21

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

22

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

EXPERIMENT 8

Aim
Develop c 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 is often used as a process of reliably predicting the various parameters associated
with making a project such as size, effort, cost, time, and quality. It was proposed by
Barry Boehm in 1981 and is based on the study of 63 projects, which makes it one of
the best-documented models. The key parameters which define the quality of any
software products, which are also an outcome of the COCOMO are primarily Effort &
Schedule:
• Effort: Amount of labour that will be required to complete a task. It is measured in
person-months units.
• Schedule: Simply means the amount of time required for the completion of the job,
which is, of course, proportional to the effort put in. It is measured in the units of time
such as weeks, months.

Boehm’s definition of organic, semidetached, and embedded systems:


1. Organic – A software project is said to be an organic type if the team size required
is adequately small, the problem is well understood and has been solved in the past
and also the team members have a nominal experience regarding the problem.
2. Semi-detached – A software project is said to be a Semi-detached type if the vital
characteristics such as team size, experience, knowledge of the various programming
environment lie in between that of organic and Embedded. The projects classified as
Semi- Detached are comparatively less familiar and difficult to develop compared to
the organic ones and require more experience and better guidance and creativity. E.g.:
Compilers or different Embedded Systems can be considered of Semi-Detached type.
3. Embedded – A software project requiring the highest level of complexity, creativity,
and experience requirement fall under this category. Such software requires a larger
team size than the other two models and also the developers need to be sufficiently
experienced and creative to develop such complex models.
Code
#include <stdio.h>
#include <math.h>
int main()
23

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

{
double kloc = 0;
double table[3][4] = {{2.4, 1.05, 2.5, 0.38}, {3.0, 1.12, 2.5, 0.35}, {3.6, 1.2,
2.5,
0.32}};
printf("Which model you want to calculate for?\n");
printf("a. Organic Model\n");
printf("b. Semi-Detached Model\n");
printf("c. Embedded Model\n");
char x;
scanf("%c", &x);
printf("Enter the number of lines in kLOC unit: ");
scanf("%lf", &kloc);
float effort = 0, time = 0;
effort = table[x - 'a'][0] * pow(kloc, table[x - 'a'][1]);
time = table[x - 'a'][2] * pow(effort, table[x - 'a'][3]);
printf("Effort = %f Person-Months\n", effort);
printf("Development Time = %f Months\n", time);
return 0;
}

Output

24

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

Findings and Learnings


The above written code calculates the effort and development time of different
COCOMO viz., Organic, Semi-Detached and Embedded. The user inputs the no. of
lines of codes in kLOC (kilo-Lines of Code) unit. Thereafter, for the corresponding
model, the different values are calculated using the formulas:
i. Effort = a × kLOCb
ii. Development Time = c × Effortd

25

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

EXPERIMENT 9

Aim
To develop test cases using boundary value analysis for the classification of a triangle.

Theory
Functional testing is a type of software testing in which the system is tested against
the functional requirements of the system. It is conducted to ensure that the
requirements are properly satisfied by the application. Functional testing verifies that
each function of the software application works in conformance with the requirement
and specification. Boundary Value Analysis(BVA) is one of the functional testings.
Boundary Value Analysis is based on testing the boundary values of valid and invalid
partitions.
The behaviour at the edge of the equivalence partition is more likely to be incorrect
than the behaviour within the partition, so boundaries are an area where testing is likely
to yield defects.
It checks for the input values near the boundary that have a higher chance of error.
Every partition has its maximum and minimum values and these maximum and
minimum values are the boundary values of a partition.

Problem Statement
The triangle problem accepts three integers – a, b, c as three sides of the triangle. The
range for the sides, l, of the triangle are [1,100] where l>0, it returns the type of triangle
– scalene, isosceles, equilateral, not a triangle, formed by a, b and c.

Test Cases

26

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

Findings and Learnings


Through this experiment, we learnt about Boundary value analysis which is a black
box testing technique. Going a step further, we also performed a Robust testing to test
for those inputs which are marginally more or less than the boundary values.

27

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

EXPERIMENT 10

Aim
To develop program to find cyclomatic complexity using DD Path for root of quadratic
equation.
Theory
A decision-to-decision path, or DD-path, is a path of execution (usually through a flow
graph representing a program, such as a flow chart) between two decisions.
A DD-path is a set of nodes in a program graph such that one of the following holds
(quoting and keeping Jorgensen's numbering, with comments added in parenthesis):
1. It consists of a single node with in-degree = 0 (initial node)
2. It consists of a single node without-degree = 0 (terminal node)
3. It consists of a single node with in-degree ≥ 2 or out-degree ≥ 2 (decision/merge
points)
4. It consists of a single node with in-degree = 1 and out-degree = 1
5. It is a maximal chain of length ≥ 1.
Cyclomatic complexity of a code section is the quantitative measure of the number of
linearly independent paths in it. It is a software metric used to indicate the complexity
of a program. It is computed using the Control Flow Graph of the program. The nodes
in the graph indicate the smallest group of commands of a program, and a directed
edge in it connects the two nodes i.e., if second command might immediately follow
the first command.
Code
#include <stdio.h>
#include <conio.h>
#include <math.h>
int main()
{
int a, b, c, validInput = 0, d;
double D;

printf("Enter the 'a' value: ");


scanf("%d", &a);
printf("Enter the 'b' value: ");

28

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

scanf("%d", &b);
printf("Enter the 'c' value: ");
if ((a >= 0) && (a <= 100) && (b >= 0) && (b <= 100) && (c >= 0) && (c <=
100)) {
validInput = 1;
if (a == 0)
validInput = -1;
}

if (validInput == 1) {
d = b * b - 4 * a * c;
if (d == 0) {
printf("The roots are equal and are r1 = r2 = %f\n", -b / (2 * (float)a));
}
else if (d > 0) {
D = sqrt(d);
printf("The roots are real and are r1 = %f and r2 = %f\n", (-b - D) / (2 * a),
(-b + D) / (2
* a));
}
else {
D = sqrt(-d) / (2 * a);
printf("The roots are imaginary and are r1 = (%f, %f) and r2 = (%f, %f)\n",
-b / (2.0 *
a), D, -b / (2.0 * a), -D);
}
}
else if (validInput == -1) {
printf("The values do not constitute a Quadratic Equation.");
}
else {
29

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

printf("The input belongs to invalid range.");


}
getche();
return 1;
}
Output

Program Flow Graph

30

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

DD Path Graph

Mapping Table for DD Path Graph

Flow DD Path graph Remarks


Graph corresponding
Nodes node

1 to 10 A Sequential Nodes

11 B Decision Node

12 C Intermediate Node

13 D Decision Node

14,15 E Sequential Node

16 F Two edges are combined here

17 G Two edges are combined and decision


node

18 H Intermediate Node

19 I Decision Node

31

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

20,21 J Sequential Node

22 K Decision Node

23,24,25 L Sequential Node

26,27,28,29 M Sequential Nodes

30 N Three edges are combined

31 O Decision Node

32,33 P Sequential Node

34,35,36 Q Sequential Node

37 R Three edges are combined here

38,39 S Sequential nodes with exit node

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. ABCDFGOQRS
3. ABGHIJNRS
4. ABGHIKMNRS
5. ABGOPRS
6. ABCDEFGOPRS
7. ABGHIKLNRS

Findings and Learnings


With the help of the DD Path Graph, we are able to calculate the Cyclomatic
Complexity of the given problem statement. In order to calculate this value, we learnt
to draw Problem Flow Graph and DD Path Graph.

32

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

EXPERIMENT 11
Aim
To develop equivalence class test cases for classification of a triangle and calculating
previous day for a given 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].

2. Generate the test cases using the equivalence classes identified in the previous step.
This is performed by writing test cases covering all the valid equivalence classes. Then
a test case is written for each invalid equivalence class so that no test contains more
than one invalid class. This is to ensure that no two invalid classes mask each other.
Most of the time, equivalence class testing defines classes of the input domain.
However, equivalence classes should also be defined for the output domain. Hence,
we should design equivalence classes based on input and output domains.

Equivalence Test Cases For:

1. Classification of a Triangle

Output Domain Test Cases:


Test Case Number x y z Expected Output

1 50 50 50 Equilateral

2 50 99 100 Scalene

3 99 50 50 Isosceles

33

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

4 1 50 100 Not a triangle

Input Domain Test Cases:


Test Case Number x y z Expected Output

1 0 50 50 invalid input

2 50 50 50 equilateral

3 101 50 50 invalid input

4 50 50 0 invalid input

5 50 50 50 equilateral

6 50 50 101 invalid input

7 50 0 50 invalid input

8 50 50 50 equilateral

9 50 101 50 invalid input

10 30 30 30 equilateral

11 30 30 45 isosceles

34

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

12 30 35 40 scalene

13 30 35 35 isosceles

14 30 35 30 isosceles

15 30 25 55 not a triangle

16 30 55 25 not a triangle

2. Calculating Weekdays for a Given Date and Next Date

Output Domain Test Cases:


Test Case Number M D Y Expected Output

1 6 15 1962 14th June, 1962

2 6 31 1962 Invalid Date

Input Domain Test Cases:


Test Case Number M D Y Expected Output

1 6 15 1962 14th June, 1962

2 -1 15 1962 Invalid Date

35

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

3 13 15 1962 Invalid Date

4 6 15 1962 14th June, 1962

5 6 -1 1962 Invalid Date

6 6 32 1962 Invalid Date

7 6 15 1962 14th June, 1962

8 6 15 1899 Invalid input (Value out of range)

9 6 15 2026 Invalid input (Value out of range)

Finding and Learning


We utilized the concepts of Equivalence Class Testing to generate test cases for two
problems, classification of triangle and calculation of previous date from given date.
Whenever the input goes out of range, it gives the output “invalid input”. Otherwise,
we get the desired output. Range for sides of triangle: 0 < l <= 100.
Range of given date:
1 <= M <= 12
1 <= D <= 31
1900 <= Y <= 2025

36

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

EXPERIMENT 12
Aim
To create a program to predict reliability metric using different models.

Theory
Reliability metrics are used to quantitatively expressed the reliability of the software
product. The option of which metric is to be used depends upon the type of system to
which it applies & the requirements of the application domain.

Some reliability metrics which can be used to quantify the reliability of the software
product are as follows:

1. Mean Time to Failure (MTTF)

MTTF is described as the time interval between the two successive failures. An MTTF
of 200 mean that one failure can be expected each 200-time units. The time units are
entirely dependent on the system & it can even be stated in the number of transactions.
MTTF is consistent for systems with large transactions.
For example, it is suitable for computer-aided design systems where a designer will
work on a design for several hours as well as for Word-processor systems.
To measure MTTF, we can evidence the failure data for n failures. Let the failures
appear at the time instants t1,t2......tn.
MTTF can be calculated as

2. Mean Time to Repair (MTTR)


Once failure occurs, some-time is required to fix the error. MTTR measures the
average time it takes to track the errors causing the failure and to fix them.
3. Mean Time Between Failure (MTBR)
We can merge MTTF & MTTR metrics to get the MTBF metric.
MTBF = MTTF + MTTR
Thus, an MTBF of 300 denoted that once the failure appears, the next failure is
expected to appear only after 300 hours. In this method, the time measurements are
real-time & not the execution time as in MTTF.

37

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

Code
#include <iostream>
#include <math.h>
#include <stdlib.h>
using namespace std;
int main()
{
float choice, fi1, fi2, ef1, ef2, fit1, fidp, et1, et2;
cout << "Implement\n1.Basic Execution Time
Model\n2.Logarithmic Poisson Execution Time \n\nEnter choice :
";
cin >> choice;

if (choice == 1)
{
cout << "Enter failure intensity at the start of execution\n";
cin >> fi1;
cout << "Enter expected number of failures experienced\n";
cin >> ef1;
cout << "Enter number of failures that occur in infinite time\n";
cin >> fit1;
cout << "Enter execution time\n";
cin >> et1;
cout << "Current Failure Intensity:" << (fi1 * (1 - (ef1 / fit1))) <<
endl; cout << "Slope of failure intensity function:" << -fi1 / fit1 << endl;
cout << "No of failures at execution time:" << fit1 * (1 - exp(-(fi1 * et1) /
fit1)) << endl;
cout << "Failure intensity at execution time:" << fi1 * exp(-fi1 *
et1 / fit1) << endl;
}
else if (choice == 2)
{
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;

38

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

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

39

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

Findings and Learnings


These metrics help predict the quality of the product once you've addressed major
issues and the software development project is complete.
Several purposes for using software reliability metrics include:
• Increasing return on investment (ROI)
• Identifying bugs and other issues
• Integrating new code
• Managing workflows
• Reducing employee workload
• Reducing costs
Metrics are critical for; quality assurance, management, debugging,
performance, and forecasting costs.

40

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

EXPERIMENT 13
Aim
To develop a program to calculate maintenance metrics using different models.

Theory
Effective maintenance of equipment is a critical factor in delivering quality operations
that provide timely resources at a minimal cost. However, those in the maintenance
field understand that equipment reliability does not come easy. Some important
maintenance metrics one should track if they want to improve and optimize their
maintenance operations are:
1. Planned maintenance percentage (PPC)
2. Overall Equipment Effectiveness (OEE)
3. Preventive maintenance compliance (PMC)

I. Planned Maintenance Percentage (PPC)


This metric represents the percentage of time spent on planned maintenance
activities against the unplanned.
In simpler terms, this metric tells you how much maintenance work done on a
particular asset was a part of your preventive maintenance plan versus how
much time you’ve spent repairing it because it unexpectedly broke down.
In a great system, 90% of the maintenance should be planned.
The calculation is as follows:
PPC = (scheduled maintenance time/total maintenance hours) x 100
II. Overall Equipment Effectiveness (OEE)
OEE is the measure of the productivity of a piece of equipment. It gives informed
data on how effective an organization's maintenance processes are running
based on factors like equipment quality, performance, and availability. A 100%
OEE means that your system is producing no defects, as fast as possible, and
with no stops in the production.
To calculate the OEE, you multiply the availability by the
performance and quality: OEE = availability x performance x
quality
III. Preventive Maintenance Compliance (PMC)
PM compliance is defined as the percentage of the preventive work scheduled
and completed in a set time.

41

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

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.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 quality\n";
cin >> ava >> per >> qual;
cout << "Overall Equipment Effectiveness = " << ava * per *
qual << endl; }
else if (choice == 3) {
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

42

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

cout << "Wrong choice\n";


return 0; }

Output

Findings and Learnings


Software Maintenance must be performed in order to:
• Correct faults.
• Improve the design.
• Implement enhancements.
• Interface with other systems.
• Accommodate programs so that different hardware, software, system features,
and telecommunications facilities can be used.
• Migrate legacy software.
• Retire software.
43

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)


lOMoARcPSD|47654830

Challenges in Software Maintenance:


• The popular age of any software program is taken into consideration up to ten
to fifteen years. As software program renovation is open ended and might
maintain for decades making it very expensive.
• Older software programs, which had been intended to paint on sluggish
machines with much less reminiscence and garage ability cannot maintain
themselves tough in opposition to newly coming more advantageous software
programs on contemporary-day hardware.
• Changes are frequently left undocumented which can also additionally reason
greater conflicts in future.
• As the era advances, it turns into high priced to preserve vintage software
programs.
• Often adjustments made can without problems harm the authentic shape of
the software program, making it difficult for any next adjustments.

44

Downloaded by Astha Dahiya (asthadahiya2004@gmail.com)

You might also like