CS FundamentalsVery hardProduct-company placement · GATE CS
Class Cart has 5 methods. Together they call 9 methods of other classes, of which 7 are distinct. What is its Response For a Class (RFC) = number of own methods + distinct methods directly called?
- A. 14
- B. 12
- C. 7
- D. 5
Correct answer: B. 12
RFC = 5 + 7 = 12. Each called method is counted once however often it is called, so using all 9 calls (14) is wrong. A high RFC means more potential behaviour to understand and test.
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 class has four methods with cyclomatic complexities 1, 3, 2 and 4. Using the CK metric Weighted Methods per Class (WMC) with cyclomatic…
- David Parnas's information-hiding principle says how a system should be divided into modules. Which statement captures it?
- Match each system with its architectural style. P: a compiler with lexer → parser → optimiser → code generator. Q: a typical 3-tier web…
- In MVVM, unlike MVC and MVP, how does the view usually get updated when data changes?
- A company organised as separate frontend, backend and database teams keeps producing a three-tier system even when microservices were…
- A public JSON API is used by many clients that ignore unknown fields. How many of these changes are breaking: (1) adding a new optional…