50 multiple-choice questions with answers and detailed explanations. Untimed — choose an answer to check it instantly.
0/50 answered0 correct
Question 1 of 50
What is an abstract data type (ADT)?
Correct answer: A) A data type whose creation and update are constrained to well-defined operations
Explanation: An ADT is a data type that hides its implementation details, allowing users to interact with it through defined operations only.
Question 2 of 50
What does UML stand for in software development?
Correct answer: D) Unified Modeling Language
Explanation: UML is a standardized modeling language used to specify, visualize, and document models of software systems.
Question 3 of 50
What is the purpose of a UML class diagram?
Correct answer: B) To model the structure of classes in a system
Explanation: A UML class diagram is used to show the static structure of classes in a system, including their attributes and methods.
Question 4 of 50
What does a UML sequence diagram represent?
Correct answer: A) The interaction between system components over time
Explanation: A UML sequence diagram shows how objects interact in a specific order to complete a task.
Question 5 of 50
What is a software requirements specification (SRS)?
Correct answer: A) A document describing all requirements for a software product
Explanation: An SRS outlines the functional and non-functional requirements of a software system, serving as a guide for its development.
Question 6 of 50
What is the primary goal of the analysis phase in SDLC?
Correct answer: C) Define the program's goals
Explanation: The analysis phase is used to gather and define the goals and requirements for a system before proceeding to design and development.
Question 7 of 50
What is the role of the design phase in the SDLC?
Correct answer: C) Define how the system will be built
Explanation: The design phase focuses on specifying the architecture, components, interfaces, and data for a system to achieve its requirements.
Question 8 of 50
What is the focus of the implementation phase in SDLC?
Correct answer: A) Writing the program code
Explanation: The implementation phase involves coding the system based on the design documents and specifications from the previous phase.
Question 9 of 50
What does the testing phase ensure in SDLC?
Correct answer: B) The system meets its requirements
Explanation: The testing phase ensures that the system works as expected and meets the defined requirements by running various test cases.
Question 10 of 50
What is the waterfall approach in SDLC?
Correct answer: A) A process where each phase is completed before moving to the next
Explanation: The waterfall model is a sequential SDLC approach where each phase must be fully completed before moving on to the next.
Question 11 of 50
What is the spiral approach in SDLC?
Correct answer: A) A method of developing a system incrementally with each iteration
Explanation: The spiral approach allows for incremental development of a system, with each phase being revisited to add more functionality.
Question 12 of 50
What is an object in object-oriented programming (OOP)?
Correct answer: C) A collection of data and operations that can be performed on that data
Explanation: An object in OOP is a self-contained entity that consists of both data (attributes) and methods (operations) that act on that data.
Question 13 of 50
What is abstraction in OOP?
Correct answer: A) Hiding implementation details from the user
Explanation: Abstraction is the concept of hiding the complex implementation details of a system and exposing only the necessary parts to the user.
Question 14 of 50
What is encapsulation in OOP?
Correct answer: C) Hiding data and methods within a class
Explanation: Encapsulation is the practice of keeping an objects data private and only allowing controlled access to it through public methods.
Question 15 of 50
What does a UML use case diagram represent?
Correct answer: C) The functionality a system provides to users
Explanation: A UML use case diagram shows the various ways that a user might interact with the system to perform specific functions.
Question 16 of 50
What is the purpose of a UML activity diagram?
Correct answer: A) To describe the flow of control in a system
Explanation: A UML activity diagram is a flowchart that represents the sequence of activities and decisions that control a process or system behavior.
Question 17 of 50
What is a UML behavioral diagram?
Correct answer: A) A diagram that visualizes dynamic behavior of software
Explanation: Behavioral diagrams in UML, such as activity diagrams and sequence diagrams, depict the dynamic aspects of a system, including interactions and state changes.
Question 18 of 50
What does a UML class diagram depict?
Correct answer: B) The classes and their relationships in a system
Explanation: A UML class diagram shows the static structure of a system by modeling its classes, attributes, methods, and relationships.
Question 19 of 50
What is the benefit of modular development?
Correct answer: B) It allows the program to be divided into smaller, manageable components
Explanation: Modular development breaks down a program into smaller modules, making it easier to develop, maintain, and test.
Question 20 of 50
What is incremental development?
Correct answer: B) Writing and testing small parts of the program incrementally
Explanation: Incremental development involves writing a small amount of code, testing it, and gradually adding more functionality while testing at each step.
Question 21 of 50
What is a function stub?
Correct answer: B) A placeholder for a function definition that has not been fully implemented
Explanation: A function stub is used during the early stages of development as a placeholder for a function that is yet to be fully implemented.
Question 22 of 50
What is a return variable in a function?
Correct answer: B) A variable that is returned by the function as output
Explanation: A return variable is a value that the function outputs after completing its execution, which can be used in further calculations or operations.
Question 23 of 50
How many values can a function return?
Correct answer: A) 1
Explanation: A function can only return one value, although that value could be a complex data type such as an array or an object containing multiple values.
Question 24 of 50
What does the term 'seed' refer to in random number generation?
Correct answer: B) The initial value used to generate a sequence of random numbers
Explanation: A seed is used in pseudo-random number generation to initialize the algorithm, ensuring the same sequence of random numbers can be reproduced.
Question 25 of 50
What does the modulo operator (%) return?
Correct answer: B) The remainder of the division of two numbers
Explanation: The modulo operator returns the remainder after dividing two integers, which can be useful in various algorithms.
Question 26 of 50
What is the purpose of type casting in programming?
Correct answer: A) To convert a value of one type to another
Explanation: Type casting is the process of converting a variable from one data type to another, for instance, from an integer to a float.
Question 27 of 50
What does a loop do in a program?
Correct answer: A) It repeatedly executes a block of statements while a condition is true
Explanation: A loop executes a sequence of statements multiple times based on a condition, making it useful for repetitive tasks.
Question 28 of 50
What is an infinite loop?
Correct answer: C) A loop that never terminates
Explanation: An infinite loop is a loop where the termination condition is never met, causing the loop to run endlessly unless interrupted.
Question 29 of 50
What is a sentinel value in programming?
Correct answer: A) A special value used to terminate a loop
Explanation: A sentinel value signals the end of a list or data set, often used in loops to indicate that no further processing is needed.
Question 30 of 50
What is a do-while loop?
Correct answer: B) A loop that executes its body at least once before checking the condition
Explanation: A do-while loop ensures that the loop body is executed at least once before evaluating the loop condition for subsequent iterations.
Question 31 of 50
What is the difference between a while loop and a for loop?
Correct answer: B) A while loop iterates based on a condition, while a for loop iterates a fixed number of times
Explanation: A while loop continues as long as a condition is true, while a for loop runs for a predetermined number of iterations.
Question 32 of 50
What is the purpose of a return statement in a function?
Correct answer: B) To return a value to the caller of the function
Explanation: The return statement in a function returns a value to the code that called the function, allowing the value to be used in further calculations.
Question 33 of 50
What is a function definition?
Correct answer: A) A block of code that can be reused
Explanation: A function definition is the part of the code where a function is defined, including its name, parameters, and the statements it executes.
Question 34 of 50
What is an argument in a function call?
Correct answer: B) The value passed to a functions parameter during a function call
Explanation: An argument is the value provided to a function when it is called, which is used as input by the function.
Question 35 of 50
What is a function parameter?
Correct answer: A) A value that is passed to a function during its call
Explanation: A function parameter is the input defined in the function declaration that receives the argument value when the function is called.
Question 36 of 50
What does the term scope refer to in programming?
Correct answer: C) The accessibility of a variable within certain parts of a program
Explanation: The scope of a variable refers to the part of the program where the variable can be accessed, such as within a function or throughout a class.
Question 37 of 50
What is recursion in programming?
Correct answer: A) A process in which a function calls itself
Explanation: Recursion is a technique in which a function makes one or more calls to itself to solve a problem. It breaks a problem down into smaller instances of the same problem.
Question 38 of 50
What is base case in recursion?
Correct answer: A) The condition that stops the recursion
Explanation: A base case is a condition in recursive functions that stops further recursive calls, preventing an infinite loop.
Question 39 of 50
What is an abstract data type (ADT)?
Correct answer: A) A data type whose implementation details are hidden
Explanation: An abstract data type (ADT) allows programmers to define operations on a data type without needing to understand its internal workings.
Question 40 of 50
What is information hiding in programming?
Correct answer: B) Restricting access to the internal workings of a class or object
Explanation: Information hiding refers to encapsulating the details of how an object or class operates, allowing access only to the essential parts of its interface.
Question 41 of 50
What does a UML sequence diagram depict?
Correct answer: B) The interactions between components in a system over time
Explanation: A sequence diagram shows the interactions between different components or objects in a system, and the order in which they occur.
Question 42 of 50
What is the purpose of a class in object-oriented programming?
Correct answer: A) To define objects that share common properties and behaviors
Explanation: A class is a blueprint for creating objects. It defines the attributes (data) and methods (behaviors) that the objects created from the class will have.
Question 43 of 50
What is object-oriented programming (OOP)?
Correct answer: A) A programming paradigm that uses objects to design applications
Explanation: OOP is a programming paradigm centered around the concept of objects, which are instances of classes that contain both data and methods.
Question 44 of 50
What is inheritance in object-oriented programming?
Correct answer: A) The ability of one class to inherit properties and methods from another class
Explanation: Inheritance allows a new class to inherit the attributes and methods of an existing class, promoting code reuse.
Question 45 of 50
What is encapsulation in OOP?
Correct answer: A) Binding together data and the functions that manipulate that data
Explanation: Encapsulation is the principle of bundling the data (attributes) and methods (functions) that operate on the data into a single unit, or class.
Question 46 of 50
What is polymorphism in OOP?
Correct answer: A) The ability of different objects to respond to the same function in different ways
Explanation: Polymorphism allows objects of different classes to be treated as objects of a common super class. It enables one function to handle different types of objects in a meaningful way.
Question 47 of 50
What is an interface in programming?
Correct answer: A) A shared boundary across which components of a system interact
Explanation: An interface is a contract that defines a set of methods that a class must implement, but does not specify how these methods should be implemented.
Question 48 of 50
What is the purpose of a constructor in a class?
Correct answer: A) To initialize an object when it is created
Explanation: A constructor is a special method in a class that is automatically called when an object of that class is created, used to initialize the objects attributes.
Question 49 of 50
What is a destructor in object-oriented programming?
Correct answer: A) A method used to destroy objects that are no longer needed
Explanation: A destructor is a special method that is automatically invoked when an object is no longer in use, allowing it to free up any resources it has used.
Question 50 of 50
What is method overloading in OOP?
Correct answer: A) Defining multiple methods with the same name but different parameters
Explanation: Method overloading allows a class to define multiple methods with the same name but different parameter lists, providing different ways to perform an operation.
Set 3 complete
You scored 0%
0 correct out of 0 answered (50 questions in this set).