Skip to content

Session 2

Effort and cost estimate for the Railway Reservation System using Function Point Analysis and COCOMO

Updated View as Markdown

This session turns the scope statement of Session 1 into numbers: how big the Railway Reservation System (RRS) is, how many person-months it needs, how long it will take, how many people to hire, and what it will cost. The manual asks for “any estimation technique”. We use two that fit together: Function Point Analysis (FPA) to measure size from the scope, and the basic COCOMO model to convert size into effort, duration, and cost. A third, quicker method (expert judgement) is used as a cross-check. Session 13 cites these figures when comparing the estimate with the real program, so keep every number exactly as computed here.

Objectives

Do not copy. Read for understanding and the viva
  • Count unadjusted function points for the eight RRS modules from the scope statement.
  • Rate the 14 general system characteristics and compute the value adjustment factor.
  • Convert adjusted function points to lines of code and apply basic COCOMO (organic mode).
  • Derive duration, average staff, and cost in rupees from the effort figure.
  • Cross-check the model estimate against an expert judgement estimate and explain the difference.

Problem Statement

Write in lab record

Session 2: Estimate the effort and cost required to build the above software. Use any estimation technique.

Concept

Do not copy. Read for understanding and the viva

Why estimate before design

The project plan (manual section 1.2) needs a delivery deadline, a resource requirement, and a budget before the SRS exists. All three come from an estimate of size and effort. An estimate made from scope is rough (plus or minus 25 percent is normal), so it is revised after the SRS and again after design. The value of this session is the method, which stays the same at each revision.

Function Point Analysis

FPA measures size from what the software does for its users, not from code. Each function in the scope is classified as one of five types and rated simple, average, or complex.

TypeMeaningSimpleAverageComplex
External Input (EI)Data enters the system and updates a file (a form, a transaction)346
External Output (EO)Derived data leaves the system (a report, a receipt, a message with computed values)457
External Inquiry (EQ)A request that retrieves data without deriving or updating it (a lookup)346
Internal Logical File (ILF)A logical group of data maintained inside the system (a master table)71015
External Interface File (EIF)A logical group of data used by the system but maintained outside it5710

Complexity depends on the number of data elements and files touched. For a scope-level count use a simple rule: one form with a few fields is simple; a form that touches two files is average; a form that touches three or more files or has many rules (route definition, booking with up to 6 passengers and seat allocation) is complex. Each ILF is counted once, in the module that maintains it.

Unadjusted function points (UFP) is the sum of weights. Then 14 general system characteristics (GSC) are each rated 0 to 5 and the value adjustment factor is VAF equals 0.65 plus 0.01 times the sum of ratings. Adjusted function points AFP equals UFP times VAF.

From function points to lines of code

COCOMO needs size in thousands of lines of code (KLOC). Published backfiring tables give an average lines-per-function-point for each language. For Python we use 60 LOC per FP, a conservative figure for a beginner team writing readable code with docstrings.

Basic COCOMO

Basic COCOMO (Boehm, 1981) has three modes. Organic mode is for small teams, familiar problems, and flexible requirements, which describes an MCA project team building a reservation system. The formulas are:

  • Effort E equals 2.4 times KLOC to the power 1.05, in person-months (PM)
  • Duration D equals 2.5 times E to the power 0.38, in calendar months
  • Average staff equals E divided by D

Semi-detached mode (3.0, 1.12, 2.5, 0.35) and embedded mode (3.6, 1.20, 2.5, 0.32) give higher effort and are used for larger or tightly constrained systems. The exponent above 1 means effort grows faster than size, because communication overhead grows with the team.

Expert judgement

An experienced developer looks at each module and states a figure from memory of similar work. It is fast and captures things a model cannot see, but it is only as good as the expert. Using it alongside a model and explaining any gap is normal practice.

Estimation

Write in lab record

1. Function count by module

Functions are taken from section 4 of the Session 1 scope statement.

ModuleFunctionTypeComplexityFP
1 User ManagementRegister userEIAverage4
1 User ManagementLoginEISimple3
1 User ManagementUpdate profileEISimple3
1 User ManagementChange passwordEISimple3
1 User ManagementView profileEQSimple3
1 User ManagementUser fileILFSimple7
2 Train and ScheduleAdd trainEIAverage4
2 Train and ScheduleAdd stationEISimple3
2 Train and ScheduleDefine route (stop sequence, times, distance)EIComplex6
2 Train and ScheduleAdd coach with seatsEISimple3
2 Train and ScheduleSet fare per km per classEISimple3
2 Train and ScheduleCreate schedule for run dateEIAverage4
2 Train and ScheduleUpdate schedule status (cancelled, delayed)EIAverage4
2 Train and ScheduleStation fileILFSimple7
2 Train and ScheduleTrain file (Train, Route, Coach, Seat)ILFComplex15
2 Train and ScheduleSchedule fileILFSimple7
2 Train and ScheduleFare fileILFSimple7
3 Search and AvailabilitySearch trains by source, destination, dateEQComplex6
3 Search and AvailabilityCheck availability per classEQAverage4
3 Search and AvailabilityFare enquiryEQSimple3
3 Search and AvailabilityList stationsEQSimple3
4 BookingCreate booking (passengers, seat allocation, PNR, waitlist)EIComplex6
4 BookingShow and print ticketEOAverage5
4 BookingPNR status enquiryEQAverage4
4 BookingBooking file (Booking, Passenger)ILFAverage10
5 Cancellation and RefundCancel booking (release seats, promote waitlist)EIComplex6
5 Cancellation and RefundRefund statement (amount by refund rule)EOAverage5
5 Cancellation and RefundRefund status enquiryEQSimple3
5 Cancellation and RefundRefund fileILFSimple7
6 PaymentInitiate paymentEIAverage4
6 PaymentPayment gateway callback (confirm or fail)EIAverage4
6 PaymentPayment receiptEOSimple4
6 PaymentPayment fileILFSimple7
6 PaymentPayment Gateway transaction dataEIFSimple5
7 NotificationBooking confirmation messageEOSimple4
7 NotificationCancellation messageEOSimple4
7 NotificationSchedule change alertEOAverage5
7 NotificationNotification logILFSimple7
7 NotificationNotification Service delivery statusEIFSimple5
8 ReportsOccupancy report per train per scheduleEOComplex7
8 ReportsRevenue report by date rangeEOAverage5
8 ReportsCancellation and refund reportEOAverage5

2. Unadjusted function points

Each cell shows the number of functions and, in brackets, their function points.

ModuleEIEOEQILFEIFUFP
1 User Management4 (13)01 (3)1 (7)023
2 Train and Schedule Management7 (27)004 (36)063
3 Search and Availability004 (16)0016
4 Booking1 (6)1 (5)1 (4)1 (10)025
5 Cancellation and Refund1 (6)1 (5)1 (3)1 (7)021
6 Payment2 (8)1 (4)01 (7)1 (5)24
7 Notification03 (13)01 (7)1 (5)25
8 Reports03 (17)00017
Total15 (60)9 (44)7 (26)9 (74)2 (10)214

Check by type: 60 + 44 + 26 + 74 + 10 = 214. Check by module: 23 + 63 + 16 + 25 + 21 + 24 + 25 + 17 = 214.

UFP = 214

3. General system characteristics

No.CharacteristicRating (0 to 5)Reason
1Data communications4Web application; every function goes over HTTPS
2Distributed data processing2One server, but payment and notification are remote calls
3Performance4Search within 3 seconds under 500 concurrent users
4Heavily used configuration2Ordinary web server and database server
5Transaction rate4Peak booking load when new schedules open
6Online data entry5All input is interactive; there is no batch entry
7End-user efficiency3Passengers are untrained public users; screens must be simple
8Online update4Seat availability updates in real time on every booking and cancellation
9Complex processing2Refund rules and waitlist promotion; no heavy computation
10Reusability2Payment and notification components can be reused by other railway systems
11Installation ease1Installed once on one server
12Operational ease3Daily schedule creation and backups need an operator
13Multiple sites2Counters at many stations use the same server
14Facilitate change2Fares and refund rules change through data, not code
Total degree of influence40

VAF = 0.65 + 0.01 × 40 = 0.65 + 0.40 = 1.05

4. Adjusted function points and size

AFP = UFP × VAF = 214 × 1.05 = 224.7, rounded to 225 FP

Size = 225 FP × 60 LOC per FP = 13,500 LOC = 13.5 KLOC

5. Effort, duration, and staff (basic COCOMO, organic mode)

Effort:

E = 2.4 × (KLOC)^1.05
  = 2.4 × (13.5)^1.05

  log10(13.5)          = 1.1303
  1.1303 × 1.05        = 1.1868
  antilog10(1.1868)    = 15.38

E = 2.4 × 15.38 = 36.9 person-months

Duration:

D = 2.5 × (E)^0.38
  = 2.5 × (36.9)^0.38

  log10(36.9)          = 1.5671
  1.5671 × 0.38        = 0.5955
  antilog10(0.5955)    = 3.94

D = 2.5 × 3.94 = 9.85 calendar months, rounded to 10 months

Average staff:

Staff = E / D = 36.9 / 9.85 = 3.75, rounded up to 4 persons

Productivity check: 13,500 LOC / 36.9 PM = 366 LOC per person-month, which is within the 300 to 500 range expected for an organic project in a high-level language.

6. Cost

Rate assumed: Rs 60,000 per person-month, the fully loaded cost (salary, workspace, equipment) of a junior developer in an Indian software services company.

ItemCalculationAmount (Rs)
Development effort36.9 PM × Rs 60,00022,14,000
Server hosting for 12 monthsRs 6,000 × 1272,000
Payment gateway and SMS gateway setupFixed38,000
Development tools and licencesFixed40,000
Total estimated cost23,64,000

Estimated cost of the RRS: Rs 23,64,000 (about Rs 23.6 lakh), delivered in 10 months by a team of 4.

7. Team plan

RolePersonsMonths engaged
Project lead and analyst (also designs and reviews)110
Developers210
Tester and documentation17 (from month 4)

Person-months engaged: 10 + 20 + 7 = 37, which matches E = 36.9 PM.

8. Cross-check by expert judgement

Three developers with reservation-system experience were asked to estimate each module in person-months. Their averages:

ModuleExpert estimate (PM)FPA share (PM)
1 User Management34.0
2 Train and Schedule Management610.9
3 Search and Availability32.8
4 Booking64.3
5 Cancellation and Refund33.6
6 Payment44.1
7 Notification24.3
8 Reports32.9
Integration testing and documentation4included above
Total3436.9

The FPA share column distributes E = 36.9 PM in proportion to each module’s UFP (for example module 2: 63 / 214 × 36.9 = 10.9).

Comparison: expert judgement gives 34 PM and Rs 20,40,000 for development effort against 36.9 PM and Rs 22,14,000 from COCOMO, a gap of 8 percent. The experts rate Booking higher than FPA does because seat allocation and waitlist logic are hard to get right even though they are one function; they rate Train and Schedule Management lower because it is mostly simple data entry forms. Both figures fall within the plus or minus 25 percent expected at the scope stage. We adopt the COCOMO figure of 36.9 PM because it is the larger and safer one, and record the expert figure as the lower bound.

9. Summary of the estimate

QuantityValue
Unadjusted function points214
Value adjustment factor1.05
Adjusted function points225
Size13,500 LOC (13.5 KLOC)
Effort36.9 person-months
Duration9.85 months (10 months)
Average staff4
Development costRs 22,14,000
Total cost including resourcesRs 23,64,000
Expert judgement cross-check34 PM, Rs 20,40,000

Viva Questions

Do not copy. Read for understanding and the viva
  • Q: Why count function points instead of lines of code directly? A: Function points can be counted from the scope before any code exists, and they do not depend on the language.
  • Q: What is the difference between an EO and an EQ? A: An EO contains derived or computed data (a report, a refund amount); an EQ only retrieves stored data (PNR status).
  • Q: Why is the Train file counted as complex? A: It groups Train, Route, Coach, and Seat, many data elements across several record types.
  • Q: What does VAF do? A: It scales the raw count by up to plus or minus 35 percent for technical factors like performance, online update, and multiple sites.
  • Q: Why organic mode? A: Small team, familiar application type, and flexible requirements; embedded mode is for real-time or safety-critical systems.
  • Q: Why is the exponent in the effort formula more than 1? A: Effort grows faster than size because communication and integration overhead rise with team size.
  • Q: Why is duration not simply effort divided by team size? A: Adding people does not shorten work proportionally; COCOMO derives duration from effort with an exponent of 0.38.
  • Q: What would change if the team used C instead of Python? A: LOC per FP would roughly double (about 128), so KLOC, effort, and cost would rise.
  • Q: How accurate is this estimate? A: Plus or minus 25 percent at the scope stage; it is revised after the SRS and after design.

Common Mistakes

Do not copy. Read for understanding and the viva
  • Picking a KLOC figure from the air (such as 75 KLOC) with no function count behind it; the examiner asks where the number came from.
  • Counting the same ILF in several modules; each file is counted once, in the module that maintains it.
  • Using intermediate COCOMO cost drivers with basic COCOMO constants, or mixing constants from two modes.
  • Rounding too early; keep two decimals until the final line, then round.
  • Quoting cost in dollars with no rate; state the rate per person-month in rupees and show the multiplication.
  • Leaving out duration and staff; effort alone does not give a delivery date.

Session Summary

Write in lab record

Submit in the lab record:

  • The problem statement copied from the manual.
  • The function count table (section 1) and the UFP summary table (section 2) totalling 214.
  • The 14 GSC ratings with reasons, VAF 1.05, AFP 225, and size 13,500 LOC.
  • The COCOMO working for E, D, and staff with logarithm steps shown.
  • The cost table with the stated rate, and the expert judgement comparison.
  • The summary table (section 9); Session 13 will compare actual code size against it.
Navigation

Type to search…

↑↓ navigate↵ selectEsc close