All Exams Test series for 1 year @ ₹349 only
Question

A Company has a choice of two languages L 1and L 2to develop a software for their client. Number of LOC required to develop an application in L 2, is thrice the LOC in language L 1. Also, software has to be maintained for next 10 years. Various parameters for two languages. are given below to decide which language should be preferred for development.

PARAMETER

L 1

L 2

Man-year needed for development

LOC/1000

LOC/1000

Development cost

Rs. 70,000

Rs. 90,000

Cost of Maintenance per year

Rs. 1,00,000

Rs. 40,000

Total cost of project include cost of development and maintenance. What is the LOC for L 1 for which cost of developing the software with both languages must be same ?

The correct answer is

3000

Software Development Cost Analysis and Calculation

This problem asks us to find the specific Lines of Code (LOC) for language L1 where the total cost of developing and maintaining a software application for 10 years is exactly the same using either language L1 or language L2. We are given various cost parameters and the relationship between LOC in L1 and L2.

Understanding the Problem Parameters

Let's first identify the key information provided for both languages, L1 and L2:

Parameter Language L1 Language L2
Man-year needed for development (per 1000 LOC) 1 Man-year / 1000 LOC 1 Man-year / 1000 LOC
Development cost per Man-year Rs. 70,000 Rs. 90,000
Cost of Maintenance per year Rs. 1,00,000 Rs. 40,000

We are also told:

  • The number of LOC required in L2 is thrice the LOC in L1.
  • The software needs to be maintained for 10 years.
  • Total cost is the sum of development cost and maintenance cost over 10 years.

Setting up the Cost Equations

Let $LOC_1$ be the Lines of Code required for language L1.

Since LOC in L2 is thrice that in L1, $LOC_2 = 3 \times LOC_1$.

Calculating Total Cost for Language L1

The total cost for L1 includes development cost and maintenance cost over 10 years.

Development Cost for L1:

  • Man-years needed for L1 = $\frac{LOC_1}{1000}$
  • Development cost for L1 = (Man-years for L1) $\times$ (Development cost per Man-year for L1)
  • Development cost for L1 = $\frac{LOC_1}{1000} \times 70,000$
  • Development cost for L1 = $70 \times LOC_1$

Maintenance Cost for L1:

  • Maintenance cost per year for L1 = Rs. 1,00,000
  • Total maintenance cost for 10 years = Maintenance cost per year $\times$ Number of years
  • Total maintenance cost for L1 = $1,00,000 \times 10 = 10,00,000$

Total Cost for L1:

  • Total Cost (L1) = Development Cost (L1) + Total Maintenance Cost (L1)
  • Total Cost (L1) = $70 \times LOC_1 + 10,00,000$

Calculating Total Cost for Language L2

The total cost for L2 includes development cost and maintenance cost over 10 years.

Development Cost for L2:

  • Man-years needed for L2 = $\frac{LOC_2}{1000}$
  • Since $LOC_2 = 3 \times LOC_1$, Man-years needed for L2 = $\frac{3 \times LOC_1}{1000}$
  • Development cost for L2 = (Man-years for L2) $\times$ (Development cost per Man-year for L2)
  • Development cost for L2 = $\frac{3 \times LOC_1}{1000} \times 90,000$
  • Development cost for L2 = $(3 \times LOC_1) \times 90$
  • Development cost for L2 = $270 \times LOC_1$

Maintenance Cost for L2:

  • Maintenance cost per year for L2 = Rs. 40,000
  • Total maintenance cost for 10 years = Maintenance cost per year $\times$ Number of years
  • Total maintenance cost for L2 = $40,000 \times 10 = 4,00,000$

Total Cost for L2:

  • Total Cost (L2) = Development Cost (L2) + Total Maintenance Cost (L2)
  • Total Cost (L2) = $270 \times LOC_1 + 4,00,000$

Finding LOC for Equal Cost

We need to find the value of $LOC_1$ for which the total cost of developing and maintaining the software is the same for both languages. So, we set the total costs equal to each other:

Total Cost (L1) = Total Cost (L2)

$70 \times LOC_1 + 10,00,000 = 270 \times LOC_1 + 4,00,000$

Now, we solve this equation for $LOC_1$:

Subtract $70 \times LOC_1$ from both sides:

$10,00,000 = 270 \times LOC_1 - 70 \times LOC_1 + 4,00,000$

$10,00,000 = 200 \times LOC_1 + 4,00,000$

Subtract $4,00,000$ from both sides:

$10,00,000 - 4,00,000 = 200 \times LOC_1$

$6,00,000 = 200 \times LOC_1$

Divide both sides by 200:

$LOC_1 = \frac{6,00,000}{200}$

$LOC_1 = \frac{6000}{2}$

$LOC_1 = 3000$

So, when the Lines of Code in language L1 is 3000, the total cost of developing and maintaining the software will be the same for both languages.

Verification (Optional)

Let's check the total cost for each language when $LOC_1 = 3000$.

If $LOC_1 = 3000$, then $LOC_2 = 3 \times 3000 = 9000$.

Total Cost (L1) with $LOC_1 = 3000$:

Development cost = $70 \times 3000 = 2,10,000$

Maintenance cost = $10,00,000$

Total Cost (L1) = $2,10,000 + 10,00,000 = 12,10,000$

Total Cost (L2) with $LOC_1 = 3000$ (and $LOC_2 = 9000$):

Development cost = $270 \times LOC_1 = 270 \times 3000 = 8,10,000$

Maintenance cost = $4,00,000$

Total Cost (L2) = $8,10,000 + 4,00,000 = 12,10,000$

The total costs are indeed the same (Rs. 12,10,000) when $LOC_1 = 3000$.

Revision Table: Software Cost Calculation

Calculation Step Formula / Equation Result ($LOC_1 = 3000$)
Development Cost (L1) $\frac{LOC_1}{1000} \times 70,000$ $\frac{3000}{1000} \times 70,000 = 3 \times 70,000 = 2,10,000$
Total Maintenance Cost (L1) $1,00,000 \times 10$ $10,00,000$
Total Cost (L1) Development Cost (L1) + Maintenance Cost (L1) $2,10,000 + 10,00,000 = 12,10,000$
Development Cost (L2) ($LOC_2 = 3 \times LOC_1$) $\frac{3 \times LOC_1}{1000} \times 90,000$ $\frac{3 \times 3000}{1000} \times 90,000 = \frac{9000}{1000} \times 90,000 = 9 \times 90,000 = 8,10,000$
Total Maintenance Cost (L2) $40,000 \times 10$ $4,00,000$
Total Cost (L2) Development Cost (L2) + Maintenance Cost (L2) $8,10,000 + 4,00,000 = 12,10,000$
Equating Total Costs $70 \times LOC_1 + 10,00,000 = 270 \times LOC_1 + 4,00,000$ $12,10,000 = 12,10,000$ (Verified)
Solving for $LOC_1$ $200 \times LOC_1 = 6,00,000$ $LOC_1 = 3000$

Additional Information: Software Cost Estimation

Software cost estimation is a crucial part of project management. It involves predicting the resources (like time, money, effort) needed for software development and maintenance. Several factors influence these costs:

  • Lines of Code (LOC): Often used as a size metric, though not always the most accurate. The problem uses LOC directly in cost calculations.
  • Development Effort (Man-hours/Man-years): The amount of human work required. This is often linked to the size (LOC) and complexity of the project, as seen in the problem's "Man-year needed for development" parameter.
  • Labor Costs: The salary rates of the development and maintenance team members. This is reflected in the "Development cost per Man-year" parameter.
  • Maintenance Costs: The ongoing costs after the software is released, including bug fixing, updates, and support. This can be a significant portion of the total lifecycle cost, as highlighted by the 10-year maintenance period in the problem.
  • Programming Language: Different languages can affect productivity, complexity, and maintenance ease, leading to variations in LOC, development effort, and maintenance costs, as demonstrated by L1 and L2.
  • Tools and Technology: The cost of software tools, hardware, and infrastructure.
  • Project Complexity: The technical difficulty and unique requirements of the project.
  • Team Experience: The skill and experience level of the development team.

Understanding how these parameters interact is essential for making informed decisions about language choice, resource allocation, and overall project budgeting.

The final answer is 3000.
Was this answer helpful?

Important Questions from Software Maintenance

  1. When a software application is modified to remain functional and compatible after its underlying operating system is upgraded, this activity falls under which category of software maintenance?

  2. Which one of the following is not typically provided by Source Code Management Software?

  3. Statistical software quality assurance in software engineering involves _________

  4. Software reliability is described with respect to

    (A) Execution Time

    (B) Calendar Time

    (C) Clock Time

    Choose the correct answer from the options given below:

  5. Modifying the software by restructuring is called

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App