CS FundamentalsVery hardGATE CS
Match each module with its type of cohesion. P: computes the mean, maximum and histogram of the same input array. Q: performs one of several unrelated I/O operations chosen by a flag argument. R: reads a record, then increments an unrelated counter, then prints a banner, because that is the order of control flow. S: validates a record and passes the validated record to the step that formats it. 1. Logical 2. Communicational 3. Sequential 4. Procedural
- A. P-2, Q-1, R-4, S-3
- B. P-3, Q-1, R-4, S-2
- C. P-2, Q-4, R-1, S-3
- D. P-2, Q-1, R-3, S-4
Correct answer: A. P-2, Q-1, R-4, S-3
Operating on the same data is communicational; a flag selecting unrelated actions is logical; steps grouped only by order of execution are procedural; the output of one step feeding the next is sequential.
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 media player has states Stopped, Playing and Paused and events play, pause and stop. Valid transitions: Stopped–play→Playing…
- A UML class diagram says each Course has 1..3 Instructors and each Instructor teaches 0..4 Courses (many-to-many). Which configuration is…
- A company split its monolith into 12 microservices, but every release still needs all 12 deployed together in a fixed order, and several…
- A gRPC API's Protocol Buffers message had field 'int32 discount = 4', which was deleted last year. A developer now adds 'string coupon =…
- For monitoring, which pairing of method and what it tracks is correct?
- A service receives 2000 requests per second; each request holds a worker thread for 150 ms on average. It runs on 4 identical instances…