Software Engineering
Software Engineering MCQs with Answers
Software engineering MCQs with answers and detailed explanations for NTS, GAT, university tests and IT job interviews. SDLC, testing and design covered. Take a scored quiz instead →
In object-oriented design, which principle states that high-level modules should not depend on low-level modules, but both should depend on abstractions?
ADependency Inversion Principle (DIP)
BSingle Responsibility Principle (SRP)
COpen-Closed Principle (OCP)
DLiskov Substitution Principle (LSP)
Which SOLID principle states that software entities (classes, modules, functions) should be open for extension, but closed for modification?
ALiskov Substitution Principle (LSP)
BOpen-Closed Principle (OCP)
CInterface Segregation Principle (ISP)
DSingle Responsibility Principle (SRP)
According to the Liskov Substitution Principle (LSP), objects of a superclass should be replaceable with objects of its subclasses without:
AIncreasing execution time
BChanging database schemas
CAltering the correctness of the program
DModifying compiler settings
The Interface Segregation Principle (ISP) dictates that clients should not be forced to depend upon:
AConcrete implementations of factory classes
BAbstract superclasses
CDatabase connection pools
DInterfaces that they do not use
Which type of cohesion occurs when elements of a module are grouped together because they execute during the same phase of execution (e.g., initialization routines)?
ATemporal Cohesion
BLogical Cohesion
CCoincidental Cohesion
DSequential Cohesion
Which type of cohesion is present when functions are placed together in a module purely because they process the same data structures or input stream?
ASequential Cohesion
BCommunicational Cohesion
CProcedural Cohesion
DLogical Cohesion
Which type of cohesion occurs when the output of one component in a module serves as the direct input to the next component?
AProcedural Cohesion
BFunctional Cohesion
CSequential Cohesion
DTemporal Cohesion
Which type of coupling occurs when one module modifies internal data or branch logic of another module directly?
ACommon Coupling
BControl Coupling
CStamp Coupling
DContent Coupling
Which type of coupling occurs when one module controls the execution flow of another module by passing control flags or switches?
AControl Coupling
BStamp Coupling
CData Coupling
DCommon Coupling
Which type of coupling is considered the cleanest and most desirable where modules interact exclusively by passing elementary primitive data parameters?
AStamp Coupling
BData Coupling
CCommon Coupling
DContent Coupling
