Life cycles, design, testing and estimation
Topics: Software crisis; SDLC models: waterfall, prototype, spiral, agile; requirements and SRS; design, cohesion and coupling; coding standards; testing; maintenance; estimation with LOC, function points, COCOMO.
Software life-cycle models
Waterfall runs phases in order and suits stable, well-understood requirements. Prototyping builds a quick model to clarify unclear requirements. The spiral model adds risk analysis in each loop for large, risky projects. Agile methods (Scrum) deliver working software in short sprints with constant customer feedback. The SRS documents what the system must do.
- Clear requirements: waterfall
- Unclear: prototype
- High risk: spiral; changing: agile
Example: A client cannot describe what screens they want. Which model suits?
- Requirements are unclear.
- Prototyping: show a model and refine it with feedback.
Answer: Prototype model
Example: Which model explicitly analyses risk in every cycle?
- Each loop includes a risk-analysis quadrant.
- The spiral model.
Answer: Spiral
Design and testing
Good design has high cohesion (each module does one job) and low coupling (modules depend little on each other). Testing levels: unit, integration, system, acceptance. Black-box testing uses inputs and outputs (equivalence classes, boundary values); white-box testing covers code paths. Cyclomatic complexity V(G) = E − N + 2 gives the number of independent paths.
- High cohesion, low coupling
- Boundary values: min−1, min, min+1, max−1, max, max+1
- V(G) = E − N + 2
Example: A flow graph has 9 edges and 8 nodes. Find its cyclomatic complexity.
- V = 9 − 8 + 2.
- = 3 independent paths.
Answer: 3
Example: An input accepts 1–100. Which values does boundary-value analysis test?
- Just below, on and just above each boundary.
- 0, 1, 2, 99, 100, 101.
Answer: 0, 1, 2, 99, 100, 101
Estimation and maintenance
Size is estimated in lines of code (LOC) or function points. Basic COCOMO for organic (small, familiar) projects: effort E = 2.4(KLOC)^1.05 person-months and duration T = 2.5E^0.38 months. Maintenance is corrective (fix bugs), adaptive (new environment), perfective (improve) or preventive, and often costs more than development.
- E = 2.4 KLOC^1.05 (organic)
- T = 2.5 E^0.38
- Four kinds of maintenance
Example: Estimate effort and duration of a 32 KLOC organic project by basic COCOMO.
- E = 2.4 × 32^1.05 ≈ 91 person-months.
- T = 2.5 × 91^0.38 ≈ 13.9 months (about 6–7 people).
Answer: ≈ 91 PM; ≈ 14 months
The waterfall model is sequential with fixed stages, prototype models build early trial versions, and the spiral model adds risk analysis in repeated cycles. Agile delivers small increments frequently. The SRS records what the system must do. Good design has high cohesion within modules and low coupling between them. Testing runs from unit through integration and system to acceptance tests: white-box looks inside the code, black-box tests behaviour through inputs and outputs; alpha at the developer’s site, beta with users. COCOMO estimates effort E = a(KLOC)^b. Maintenance can be corrective, adaptive, perfective or preventive.
- Verification: building it right; validation: building the right product.
- Cyclomatic complexity V = E − N + 2P.
- DFD shows data flow; UML includes use-case and class diagrams.
- Boundary value analysis tests limits.
- Regression testing rechecks old features.
Key formulas
- E = a(KLOC)^b
- V = E − N + 2P
- T = c(E)^d
Practice questions
The model with explicit risk analysis is
- waterfall
- spiral
- big bang
- code and fix
Show the answer
Answer: B. spiral Boehm.
Good design has
- high cohesion, low coupling
- low cohesion, high coupling
- high both
- low both
Show the answer
Answer: A. high cohesion, low coupling Independent modules.
White-box testing examines
- internal code
- only UI
- only specifications
- hardware
Show the answer
Answer: A. internal code Structural.
Black-box testing is based on
- specifications and behaviour
- source lines
- compilers
- paths only
Show the answer
Answer: A. specifications and behaviour Functional.
Beta testing is done by
- developers at their site
- users
- the compiler
- unit testers
Show the answer
Answer: B. users Real environment.
SRS stands for
- software requirements specification
- system release sheet
- source review standard
- software run schedule
Show the answer
Answer: A. software requirements specification Document.
Cyclomatic complexity measures
- independent paths
- lines
- disk use
- bugs fixed
Show the answer
Answer: A. independent paths McCabe.
COCOMO estimates
- effort
- bandwidth
- memory
- voltage
Show the answer
Answer: A. effort Person-months.
Verification asks
- are we building the product right?
- are we building the right product?
- did users pay?
- is it released?
Show the answer
Answer: A. are we building the product right? Against spec.
Regression testing checks
- old features after changes
- only speed
- only new features
- hardware
Show the answer
Answer: A. old features after changes No breakage.
The practice questions were written for this studio; they are not copied from ASTU papers. ASTU publishes no topic syllabus for these exams, so the topics are an informed guide based on diploma courses, not an official list.