CS FundamentalsHardGATE CS · Infosys
Match each scenario with its coupling type. P: a module passes a flag telling the callee which of several operations to perform. Q: a whole Employee record is passed although only the employee id is used. R: two modules read and write the same global variable. S: one module directly changes another module's private data.
- A. P-stamp, Q-control, R-common, S-content
- B. P-control, Q-stamp, R-content, S-common
- C. P-control, Q-data, R-common, S-content
- D. P-control, Q-stamp, R-common, S-content
Correct answer: D. P-control, Q-stamp, R-common, S-content
A flag that steers the callee's logic is control coupling; passing a whole structure when part is used is stamp coupling; shared globals are common coupling; reaching into another module's internals is content coupling, the worst kind.
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 module 'Startup' opens the log file, loads configuration, connects to the database and clears the cache. These tasks are unrelated…
- A UI component subscribes to a long-lived event bus in its constructor but never unsubscribes. Screens using it are opened and closed many…
- In GRASP terms, an Order aggregates its LineItems and has the data needed to initialise them. Which class should create LineItem objects…
- Assertion (A): Classes that call a Singleton through its global getInstance() are harder to unit-test. Reason (R): The dependency is…
- In the 2020 Scrum Guide each artifact has a commitment. Which pairing is correct?
- Midway through a sprint, a market change makes the Sprint Goal obsolete. According to the Scrum Guide, who can cancel the sprint?