Module-1: Software Requirement & Analysis (20 MCQs)
Q1. Which of the following is a functional requirement?
A) Response time of the system
B) User login authentication
C) Security policies
D) Reliability of the software
Answer: B) User login authentication
Q2. Non-functional requirements primarily focus on:
A) System behavior
B) Features and functionalities
C) Performance and quality attributes
D) Use case diagrams
Answer: C) Performance and quality attributes
Q3. A good requirement should be:
A) Ambiguous
B) Testable
C) Generalized
D) Open-ended
Answer: B) Testable
Q4. The primary purpose of an SRS (Software Requirements Specification) document is:
A) Coding the software
B) Providing a reference for developers and stakeholders
C) Optimizing the database design
D) Creating test cases only
Answer: B) Providing a reference for developers and stakeholders
Q5. Which is NOT a characteristic of a good requirement?
A) Verifiable
B) Ambiguous
C) Consistent
D) Traceable
Answer: B) Ambiguous
Q6. Requirements change management deals with:
A) Adding new users
B) Handling evolving requirements
C) Deleting unused modules
D) Automating the design
Answer: B) Handling evolving requirements
Q7. In object-oriented analysis, which type of object is used to model entities in the problem
domain?
A) Control objects
B) Boundary objects
C) Entity objects
D) Class objects
Answer: C) Entity objects
Q8. Boundary objects are mainly used to:
A) Store data permanently
B) Model interactions between system and external actors
C) Control the business logic
D) Handle concurrency
Answer: B) Model interactions between system and external actors
Q9. Control objects are responsible for:
A) Managing user interface
B) Controlling interactions and workflow logic
C) Storing large datasets
D) Supporting inheritance
Answer: B) Controlling interactions and workflow logic
Q10. Structured analysis focuses more on:
A) Use cases
B) Functions and data flow
C) Classes and objects
D) Packages
Answer: B) Functions and data flow
Q11. Object-oriented analysis emphasizes:
A) Data flow diagrams
B) Entities and functions
C) Classes and relationships
D) Only inheritance
Answer: C) Classes and relationships
Q12. Which of the following is NOT a type of class?
A) Entity class
B) Interface class
C) Control class
D) Function class
Answer: D) Function class
Q13. The relationship “whole-part” in object-oriented design is called:
A) Generalization
B) Aggregation
C) Composition
D) Association
Answer: B) Aggregation
Q14. Inheritance is represented as:
A) Generalization
B) Association
C) Dependency
D) Aggregation
Answer: A) Generalization
Q15. Multiplicity in relationships defines:
A) The size of a class
B) Number of instances involved in an association
C) The number of attributes in a class
D) Control objects
Answer: B) Number of instances involved in an association
Q16. Which of the following is a stronger form of aggregation?
A) Dependency
B) Composition
C) Association
D) Generalization
Answer: B) Composition
Q17. Dependency relationship indicates:
A) Permanent link
B) Temporary usage of one class by another
C) Inheritance
D) Part-whole relationship
Answer: B) Temporary usage of one class by another
Q18. Which relationship models “is-a” hierarchy?
A) Association
B) Aggregation
C) Generalization
D) Composition
Answer: C) Generalization
Q19. The main difference between aggregation and composition is:
A) Composition is weaker than aggregation
B) Aggregation is stronger than composition
C) Composition implies strong ownership
D) They are the same
Answer: C) Composition implies strong ownership
Q20. Which modeling approach is considered more natural for real-world problems?
A) Structured Analysis
B) Object-Oriented Analysis
C) Data Flow Modeling
D) Requirement Prioritization
Answer: B) Object-Oriented Analysis
✅ That’s 20 questions for Module-1.
Would you like me to continue with Module-2 (20 questions) in the same structured
format?
You said:
ALL MODULES
ChatGPT said:
Got it 👍 You want the full set of 100 MCQs (20 per module, all 5 modules) with options &
answers.
Here’s what I’ll do:
1. Prepare Module-2 to Module-5 in the same style as Module-1.
2. Compile all 100 Qs together.
3. Once you confirm, I’ll generate a single PDF file containing all questions with
answers.
✅ Module-2: Object Orientation & UML (20 MCQs)
Q21. Which of the following is NOT an object-oriented concept?
A) Encapsulation
B) Abstraction
C) Polymorphism
D) Pipelining
Answer: D) Pipelining
Q22. UML stands for:
A) Unified Machine Language
B) Unified Modeling Language
C) Universal Modeling Logic
D) User Modeling Language
Answer: B) Unified Modeling Language
Q23. Object-oriented analysis focuses on:
A) Data flow diagrams
B) Classes and objects
C) Control flow only
D) Functions only
Answer: B) Classes and objects
Q24. Which is NOT a UML diagram type?
A) Use Case Diagram
B) Activity Diagram
C) Class Diagram
D) Flowchart Diagram
Answer: D) Flowchart Diagram
Q25. In UML, a dashed arrow represents:
A) Association
B) Generalization
C) Dependency
D) Aggregation
Answer: C) Dependency
Q26. Which of the following is an advanced structural modeling element?
A) Class diagram
B) Interface
C) Use case diagram
D) State chart diagram
Answer: B) Interface
Q27. Which relationship shows “is-a” hierarchy in UML?
A) Generalization
B) Aggregation
C) Dependency
D) Association
Answer: A) Generalization
Q28. In UML, packages are used for:
A) Data storage
B) Grouping related elements
C) Creating workflows
D) User authentication
Answer: B) Grouping related elements
Q29. Which UML diagram shows system functionalities from the user’s perspective?
A) Activity diagram
B) Use case diagram
C) Sequence diagram
D) Class diagram
Answer: B) Use case diagram
Q30. Activity diagrams are mainly used to:
A) Model workflow
B) Show object structure
C) Define interfaces
D) Specify inheritance
Answer: A) Model workflow
Q31. State chart diagrams represent:
A) Object lifecycles and transitions
B) Actor interactions
C) Package dependencies
D) Class structures
Answer: A) Object lifecycles and transitions
Q32. Which UML diagram models interactions over time?
A) Activity diagram
B) Sequence diagram
C) Class diagram
D) Object diagram
Answer: B) Sequence diagram
Q33. Which is NOT a behavioral modeling diagram in UML?
A) State chart diagram
B) Use case diagram
C) Activity diagram
D) Class diagram
Answer: D) Class diagram
Q34. An object diagram represents:
A) Static relationships of classes
B) Instances of classes at a point in time
C) Workflow of use cases
D) Interactions between objects
Answer: B) Instances of classes at a point in time
Q35. Which diagram emphasizes interactions between objects?
A) Use case diagram
B) Interaction diagram
C) Class diagram
D) Activity diagram
Answer: B) Interaction diagram
Q36. Which UML concept is used to represent abstract behaviors?
A) Class
B) Interface
C) Aggregation
D) Package
Answer: B) Interface
Q37. Object-oriented methodologies include:
A) Data Flow Modeling
B) Waterfall
C) Booch and OMT
D) Prototyping only
Answer: C) Booch and OMT
Q38. In UML, the diamond shape represents:
A) Dependency
B) Generalization
C) Aggregation/Composition
D) Association
Answer: C) Aggregation/Composition
Q39. A package in UML is symbolized as:
A) Rectangle with a small tab
B) Circle with arrows
C) Cylinder
D) Dashed arrow
Answer: A) Rectangle with a small tab
Q40. The conceptual model of UML consists of:
A) Functional view, behavioral view, data view
B) Structural view, behavioral view, architectural view
C) Only class and sequence diagrams
D) Just actors and use cases
Answer: B) Structural view, behavioral view, architectural view
✅ Module-3: Detailed Design, Testing & Patterns (20
MCQs)
Q41. Sequence diagrams are a type of:
A) Class diagram
B) Structural diagram
C) Interaction diagram
D) State chart diagram
Answer: C) Interaction diagram
Q42. Use cases are refined into:
A) Test cases
B) Sequence diagrams
C) Class diagrams
D) All of the above
Answer: D) All of the above
Q43. A detailed class diagram is created during:
A) Requirement gathering
B) Design phase
C) Testing phase
D) Implementation
Answer: B) Design phase
Q44. Which diagram is most useful in generating test cases?
A) Use case diagram
B) Class diagram
C) Object diagram
D) Activity diagram
Answer: A) Use case diagram
Q45. A Software Design Document (SDD) contains:
A) Requirements only
B) Coding standards only
C) Architecture, class diagrams, and detailed design
D) Test cases only
Answer: C) Architecture, class diagrams, and detailed design
Q46. Which principle improves software quality?
A) Coupling
B) Cohesion
C) Both high cohesion and low coupling
D) Low cohesion, high coupling
Answer: C) Both high cohesion and low coupling
Q47. Design patterns are best described as:
A) Algorithms
B) General reusable solutions to common problems
C) Specific code snippets
D) Test cases
Answer: B) General reusable solutions to common problems
Q48. Which is NOT a GOF (Gang of Four) design pattern?
A) Singleton
B) Factory
C) Observer
D) Compiler
Answer: D) Compiler
Q49. The Observer pattern is used for:
A) Object creation
B) Notification between objects
C) Object destruction
D) Data storage
Answer: B) Notification between objects
Q50. Frameworks in software design provide:
A) Reusable components
B) Complete applications
C) Testing tools only
D) Databases
Answer: A) Reusable components
Q51. Unit test cases are derived from:
A) Design patterns
B) Use cases
C) Test reports
D) Frameworks
Answer: B) Use cases
Q52. Which testing ensures modules work together correctly?
A) Unit testing
B) Integration testing
C) Regression testing
D) Acceptance testing
Answer: B) Integration testing
Q53. Which testing validates against requirements?
A) System testing
B) Unit testing
C) White box testing
D) Stress testing
Answer: A) System testing
Q54. The primary goal of object-oriented design principles is:
A) Minimize cost only
B) Improve maintainability and reusability
C) Only faster execution
D) Eliminate testing
Answer: B) Improve maintainability and reusability
Q55. Which design principle states that “a class should have only one reason to change”?
A) Dependency Inversion Principle
B) Single Responsibility Principle
C) Open/Closed Principle
D) Liskov Substitution Principle
Answer: B) Single Responsibility Principle
Q56. “Program to an interface, not an implementation” belongs to:
A) Dependency Inversion Principle
B) Factory pattern
C) Prototype pattern
D) Open/Closed Principle
Answer: A) Dependency Inversion Principle
Q57. Generating test cases from use cases ensures:
A) Better security
B) Traceability to requirements
C) Faster execution
D) Less documentation
Answer: B) Traceability to requirements
Q58. Design patterns can be classified into:
A) Structural, Behavioral, Creational
B) Functional, Logical, Dynamic
C) Database, UI, Algorithmic
D) Static, Dynamic, Interactive
Answer: A) Structural, Behavioral, Creational
Q59. Which is a creational design pattern?
A) Observer
B) Factory
C) Adapter
D) Proxy
Answer: B) Factory
Q60. The Adapter pattern is used to:
A) Create objects
B) Allow incompatible interfaces to work together
C) Destroy objects
D) Test use cases
Answer: B) Allow incompatible interfaces to work together
Module-4: Java Programming Fundamentals (20 MCQs)
Q61. Which keyword is used to define a class in Java?
A) struct
B) def
C) class
D) package
Answer: C) class
Q62. Which is the entry point of any Java program?
A) init()
B) main()
C) start()
D) run()
Answer: B) main()
Q63. Which feature of Java allows the same method name with different parameters?
A) Inheritance
B) Encapsulation
C) Overloading
D) Overriding
Answer: C) Overloading
Q64. Which of the following is NOT a Java access modifier?
A) public
B) private
C) protected
D) friendly
Answer: D) friendly
Q65. In Java, interfaces are declared using:
A) abstract
B) interface
C) implements
D) package
Answer: B) interface
Q66. Which keyword is used to inherit a class?
A) this
B) extends
C) implements
D) super
Answer: B) extends
Q67. Which collection class allows key-value pairs?
A) ArrayList
B) HashMap
C) Vector
D) Stack
Answer: B) HashMap
Q68. Exception handling in Java uses:
A) try, catch, finally
B) do, while, until
C) throw, catch, exit
D) begin, rescue, end
Answer: A) try, catch, finally
Q69. Which package contains collection framework classes?
A) java.io
B) java.util
C) java.sql
D) java.lang
Answer: B) java.util
Q70. Which of these is not a Java primitive type?
A) int
B) float
C) string
D) char
Answer: C) string
Q71. Wrapper classes in Java are used for:
A) Exception handling
B) Converting primitives to objects
C) Network programming
D) Thread execution
Answer: B) Converting primitives to objects
Q72. Which interface is used for implementing queues?
A) List
B) Set
C) Queue
D) Map
Answer: C) Queue
Q73. Which method is called by the garbage collector in Java before destroying an object?
A) finalize()
B) delete()
C) destroy()
D) remove()
Answer: A) finalize()
Q74. Java supports which type of inheritance?
A) Multiple inheritance using classes
B) Single inheritance only
C) Multiple inheritance using interfaces
D) No inheritance
Answer: C) Multiple inheritance using interfaces
Q75. Which keyword is used to prevent inheritance of a class?
A) static
B) abstract
C) final
D) protected
Answer: C) final
Q76. Which collection class allows duplicate elements?
A) HashSet
B) TreeSet
C) ArrayList
D) LinkedHashSet
Answer: C) ArrayList
Q77. Which is NOT a feature of Java?
A) Platform independence
B) Object-orientation
C) Manual memory management
D) Automatic garbage collection
Answer: C) Manual memory management
Q78. The default value of a boolean in Java is:
A) true
B) false
C) null
D) 0
Answer: B) false
Q79. Which exception occurs when dividing by zero?
A) IOException
B) ArithmeticException
C) NullPointerException
D) NumberFormatException
Answer: B) ArithmeticException
Q80. Which of the following is a marker interface?
A) Serializable
B) Runnable
C) Comparator
D) Iterable
Answer: A) Serializable
✅ Module-5: Advanced Java Features (20 MCQs)
Q81. Which package is used for JDBC in Java?
A) java.sql
B) java.io
C) java.net
D) java.util
Answer: A) java.sql
Q82. A JDBC driver is used for:
A) Networking
B) Connecting to databases
C) File handling
D) Exception handling
Answer: B) Connecting to databases
Q83. Which method is used to execute SELECT queries in JDBC?
A) execute()
B) executeQuery()
C) executeUpdate()
D) runQuery()
Answer: B) executeQuery()
Q84. Which method is used to execute INSERT/UPDATE/DELETE in JDBC?
A) executeUpdate()
B) executeQuery()
C) runUpdate()
D) modify()
Answer: A) executeUpdate()
Q85. JSP stands for:
A) Java Servlet Page
B) Java Server Page
C) Java Standard Program
D) Java Storage Page
Answer: B) Java Server Page
Q86. Which tag in JSP is used to write Java code?
A) <% … %>
B) <%! … %>
C) <%= … %>
D) All of the above
Answer: D) All of the above
Q87. Which method is used in servlets for handling HTTP GET requests?
A) doPost()
B) doGet()
C) service()
D) init()
Answer: B) doGet()
Q88. The life cycle of a servlet includes:
A) init(), service(), destroy()
B) start(), run(), stop()
C) open(), process(), close()
D) create(), use(), delete()
Answer: A) init(), service(), destroy()
Q89. Which scope in JSP exists for a single request only?
A) request
B) session
C) application
D) page
Answer: A) request
Q90. Which JSP scope lasts until the browser session is closed?
A) request
B) session
C) application
D) page
Answer: B) session
Q91. Which is the correct order of servlet life cycle?
A) service → init → destroy
B) init → service → destroy
C) destroy → service → init
D) init → destroy → service
Answer: B) init → service → destroy
Q92. Which interface is implemented by all servlets?
A) Servlet
B) HttpServlet
C) Runnable
D) Applet
Answer: A) Servlet
Q93. Which of these is NOT a JDBC driver type?
A) Type 1: JDBC-ODBC bridge
B) Type 2: Native API driver
C) Type 3: Network protocol driver
D) Type 5: XML driver
Answer: D) Type 5: XML driver
Q94. Which method is used to set parameters in a PreparedStatement?
A) set()
B) setParameter()
C) setInt(), setString(), etc.
D) bind()
Answer: C) setInt(), setString(), etc.
Q95. JSP is built on top of:
A) Applets
B) JDBC
C) Servlets
D) Beans
Answer: C) Servlets
Q96. Which JSP directive defines information about the page?
A) <%! … %>
B) <%@ page … %>
C) <% include … %>
D) <% java … %>
Answer: B) <%@ page … %>
Q97. JDBC connection is established using:
A) DriverManager.getConnection()
B) Class.forName()
C) new Connection()
D) SQL.connect()
Answer: A) DriverManager.getConnection()
Q98. Which method invalidates a session in JSP/Servlets?
A) end()
B) close()
C) invalidate()
D) destroy()
Answer: C) invalidate()
Q99. Which component handles business logic in MVC architecture?
A) Model
B) View
C) Controller
D) Servlet only
Answer: A) Model
Q100. Which is NOT true about servlets?
A) They are platform-independent
B) They run on the client-side
C) They are faster than CGI
D) They extend server functionality
Answer: B) They run on the client-side