are here: Freetutes.com
Analysis and Design
Lines of Code (LOC)
Lines of Code (LOC) method measures software and the process by which it is being
developed. Before an estimate for software is made, it is important and necessary
to understand software scope and estimate its size.
Lines of Code (LOC) is a direct approach method and requires a higher level of detail by means of
decomposition and partitioning. In contrast, Function Points (FP) is indirect
an approach method where instead of focusing on the function it focuses on the
domain characteristics (discussed later in the chapter).
From statement of software scope software is decomposed into problem functions
that can each be estimated individually. LOC or FP (estimate variables) is then
calculated for each function.
An expected value is then computed using the following formula.
- EV stand for the estimation variable.
- Sopt stand for the optimistic estimate.
- Sm stands for the most likely estimate.
- Spess stand for the pessimistic estimate.
It is assumed that there is a very small probability that the actual size results
will fall outside the optimistic or pessimistic value.
Once the expected value for estimation variable has been determined, historical
LOC or FP data are applied and person months, costs etc are calculated using the
Productivity = KLOC / Person-month
Quality = Defects / KLOC
Cost = $ / LOC
Documentation = pages of documentation / KLOC
KLOC stand for no. of lines of code (in thousands).
Person-month stand for is the time(in months) taken
by developers to finish the product.
Defects stand for Total Number of errors discovered
Problem Statement: Take the Library management system
case. Software developed for library will accept data from operator for issuing
and returning books. Issuing and returning will require some validity checks.
For issue it is required to check if the member has already issued the maximum
books allowed. In case for return, if the member is returning the book after the
due date then fine has to be calculated. All the interactions will be through
user interface. Other operations include maintaining database and generating reports
at regular intervals.
Major software functions identified.
- User interface
- Database management
- Report generation
For user interface
Sopt : 1800
Sm : 2000
Spess : 4000
EV for user interface
EV = (1800 + 4*2000 + 4000) / 6
EV = 2300
For database management
Sopt : 4600
Sm : 6900
Spess : 8600
EV for database management
EV = (4600 + 4*6900 + 8600) / 6
EV = 6800
For report generation
Sopt : 1200
Sm : 1600
Spess : 3200
EV for report generation
EV = (1200 + 4*1600 + 3200) / 6
EV = 1800
Page | Contents
| Next Page >>