CS FundamentalsVery hardProduct-company placement · GATE CS
A call hierarchy has 6 modules: M1 calls M2 and M3; M2 calls M4 and M5; M3 calls M6. Using the usual counts (top-down needs a stub for every module except the root; bottom-up needs a driver for every non-leaf module), how many stubs and drivers are needed?
- A. Top-down 3 stubs; bottom-up 5 drivers
- B. Top-down 5 stubs; bottom-up 3 drivers
- C. Top-down 5 stubs; bottom-up 5 drivers
- D. Top-down 3 stubs; bottom-up 3 drivers
Correct answer: B. Top-down 5 stubs; bottom-up 3 drivers
Top-down stubs replace callees not yet integrated: every module except M1, so 6 - 1 = 5. Bottom-up drivers replace callers: one each for M1, M2 and M3, i.e. nodes - leaves = 6 - 3 = 3. Swapping the two gives the trap option.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- A developer fixes a login bug. The tester first checks that the reported bug is really gone, then re-runs a set of existing login and…
- Match each performance test with its purpose. P: load test. Q: stress test. R: soak (endurance) test. S: spike test. 1. Run at normal load…
- In a closed-loop load test, 300 virtual users each wait a think time of 5 seconds between requests, and the measured throughput is 40…
- 20 response times (ms) are: 95, 97, 98, 99, 100, 101, 102, 103, 105, 108, 110, 112, 115, 120, 125, 130, 140, 300, 450, 900. Using the…
- A tester re-checks a defect marked 'Fixed' and finds it still occurs. To which state does the defect normally move in a standard defect…
- Which pairing of severity and priority is most appropriate? Defect X: the company's name is misspelt on the home page of the live site…