wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

OOP Midterm SY2022 - 2023

Total questions: 100

Worksheet time: 33mins

Name
Class
Date
1.
What is the primary advantage of Object-Oriented Programming (OOP)?
a)
Simplicity
b)
Code efficiency
c)
Code reusability
d)
Procedural organization
2.
Which programming paradigm emphasizes structured programming and provides low-level memory manipulation capabilities?
a)
OOP
b)
Functional programming
c)
Procedural programming
d)
Assembly language
3.
In OOP, everything is represented as:
a)
Modules
b)
Variables
c)
Objects
d)
Functions
4.
Which OOP concept allows for code reuse and makes it easier to create complex objects by inheriting properties and behaviors?
a)
Polymorphism
b)
Abstraction
c)
Encapsulation
d)
Inheritance
5.
What is the primary purpose of encapsulation in OOP?
a)
Simplify code structure
b)
Enhance code readability
c)
Restrict access to data members
d)
Promote global data usage
6.
In OOP, what is a class?
a)
A module that defines functions
b)
A blueprint for an object
c)
A variable that stores data
d)
An instance of an object
7.
Which programming paradigm is known for its emphasis on organizing code and data into coherent, reusable, and interconnected modules?
a)
Functional programming
b)
Procedural programming
c)
Object-Oriented Programming (OOP)
d)
Assembly language
8.
Which OOP concept allows objects to take on different forms and behaviors depending on the context?
a)
Inheritance
b)
Abstraction
c)
Encapsulation
d)
Polymorphism
9.
What does the term "modularity" refer to in the context of OOP?
a)
The practice of organizing code into small, focused components
b)
The ability to hide implementation details from the user
c)
The process of inheriting properties and behaviors from parent classes
d)
The concept of objects taking on multiple forms
10.
Which of the following is NOT typically a benefit of Object-Oriented Programming (OOP)?
a)
Improved code organization
b)
Enhanced data security
c)
Increased code complexity
d)
Code reusability
11.
Which programming language is often used for system programming, game development, and embedded systems and introduces powerful OOP features?
a)
Stars
b)
C
c)
Python
d)
Ruby
12.
What does the term "inheritance" facilitate in OOP?
a)
Code reusability
b)
Code modularity
c)
Code abstraction
d)
Code scalability
13.
Which OOP concept allows you to create new classes that inherit the properties and behaviors of existing classes?
a)
Abstraction
b)
Encapsulation
c)
Inheritance
d)
Polymorphism
14.
In OOP, what is the primary purpose of abstraction?
a)
Restricting data access
b)
Creating blueprints for objects
c)
Hiding implementation details
d)
Promoting global data usage
15.
Which programming language is often used for Windows development, web development, and game development and incorporates OOP concepts like classes and objects?
a)
C++
b)
Python
c)
C#
d)
JavaScript
16.
What is the primary goal of encapsulation in OOP?
a)
Code reusability
b)
Code efficiency
c)
Data integrity and security
d)
Code scalability
17.
What is the key advantage of using encapsulation in OOP?
a)
Improved code readability
b)
Easier access to global data
c)
Prevention of unintended data modification
d)
Faster code execution
18.
Which OOP concept allows objects to take on different forms and behaviors based on their context?
a)
Abstraction
b)
Encapsulation
c)
Inheritance
d)
Polymorphism
19.
Which programming language is often used for data science, machine learning, and web development and is known for its ease of learning?
a)
Java
b)
C++
c)
Python
d)
C#
20.
Which programming paradigm is well-suited for applications that need to be efficient and involve direct manipulation of hardware resources?
a)
OOP
b)
Functional programming
c)
Procedural programming
d)
Assembly language
21.
What does the term "modularity" refer to in the context of OOP?
a)
The ability of objects to take on different forms
b)
The practice of breaking down code into smaller, focused components
c)
The concept of code reusability through inheritance
d)
The process of organizing code into global variables
22.
Which OOP concept involves converting variables into private entities and providing access through public methods?
a)
Abstraction
b)
Encapsulation
c)
Inheritance
d)
Polymorphism
23.
Which OOP concept allows for code reuse, reduces redundancy, and enhances maintainability?
a)
Inheritance
b)
Abstraction
c)
Encapsulation
d)
Polymorphism
24.
Which of the following is NOT a programming paradigm mentioned in the provided information?
a)
Functional programming
b)
Object-Oriented Programming (OOP)
c)
Modular programming
d)
Procedural programming
25.
What does the term "polymorphism" refer to in OOP?
a)
The practice of organizing code into small, focused components
b)
The ability to hide implementation details from the user
c)
The ability of an object to take on different forms and behaviors
d)
The process of inheriting properties and behaviors from parent classes
26.
In OOP, what are objects?
a)
Procedures
b)
Data structures
c)
Self-contained units of code with data and methods
d)
Global variables
27.
Which OOP concept allows you to adapt to changing requirements and build software that can grow with user demands?
a)
Abstraction
b)
Encapsulation
c)
Inheritance
d)
Flexibility and Scalability
28.
Which programming language is often used for scientific and engineering calculations and is primarily procedural in nature?
a)
Java
b)
Java
c)
Fortran
d)
Python
29.
Which programming language is heavily influenced by OOP principles, featuring classes, objects, and dynamic typing?
a)
Ruby
b)
Java
c)
C++
d)
JavaScript
30.
What is the primary focus of OOP languages like Java and C++?
a)
Efficient algorithm implementation
b)
Procedural code organization
c)
Object encapsulation and behavior
d)
Global data management
31.
In OOP, what is the primary goal of abstraction?
a)
Restricting access to data
b)
Hiding implementation details
c)
Promoting global data usage
d)
Enhancing code efficiency
32.
Which of the following is NOT typically a benefit of OOP?
a)
Improved code organization
b)
Increased code complexity
c)
Enhanced data security
d)
Code reusability
33.
In OOP, what is the primary advantage of encapsulation?
a)
Improved code readability
b)
Easier access to global data
c)
Prevention of unintended data modification
d)
Faster code execution
34.
Which OOP concept involves creating hierarchies of objects that inherit and extend the properties and behaviors of their parent classes?
a)
Abstraction
b)
Polymorphism
c)
Inheritance
d)
Encapsulation
35.
Which programming paradigm is often used for business applications and data processing, primarily following a procedural approach?
a)
Object-Oriented Programming (OOP)
b)
Functional programming
c)
Modular programming
d)
COBOL
36.
Which OOP concept enables objects to take on multiple forms and behaviors?
a)
Encapsulation
b)
Polymorphism
c)
Abstraction
d)
Inheritance
37.
What does the term "modularity" refer to in the context of OOP?
a)
The ability of objects to take on different forms
b)
The practice of organizing code into small, focused components
c)
The concept of code reusability through inheritance
d)
The process of organizing code into global variables
38.
Which programming language is known for its strong emphasis on OOP principles, featuring classes, objects, inheritance, and encapsulation?
a)
Python
b)
C#
c)
C++
d)
Assembly language
39.
What is the primary goal of encapsulation in OOP?
a)
Code reusability
b)
Code efficiency
c)
Data integrity and security
d)
Code scalability
40.
In OOP, what is the primary advantage of polymorphism?
a)
Improved code readability
b)
Code reusability
c)
Data security
d)
Code efficiency
41.
Python is primarily used for game development and embedded systems.
a)
True
b)
False
42.
Java is known for its weak emphasis on security.
a)
True
b)
False
43.
C++ is a powerful language commonly used for system programming and game development.
a)
True
b)
False
44.
JavaScript is exclusively used on the client-side and never on the server-side.
a)
True
b)
False
45.
Non-OOP languages tend to emphasize the encapsulation of data and behavior into reusable objects.
a)
True
b)
False
46.
Assembly languages are known for their high-level abstraction and focus on programmer-friendly syntax.
a)
True
b)
False
47.
Ruby is heavily influenced by OOP principles and features classes, objects, and dynamic typing.
a)
True
b)
False
48.
COBOL is a programming language often used for scientific calculations and engineering simulations.
a)
True
b)
False
49.
Ada is primarily focused on creating web applications and data processing.
a)
True
b)
False
50.
Inheritance and polymorphism are common concepts in OOP languages.
a)
True
b)
False
51.
Data and functions are often treated as separate entities in non-OOP languages.
a)
True
b)
False
52.
Reusability is a primary concern in non-OOP languages, just like in OOP languages.
a)
True
b)
False
53.
C# is specifically designed for building Windows applications but not for web development.
a)
True
b)
False
54.
Assembly languages provide a human-readable representation of machine code.
a)
True
b)
False
55.
The procedural paradigm focuses on organizing code into reusable objects.
a)
True
b)
False
56.
Fortran is often used for scientific and engineering calculations.
a)
True
b)
False
57.
OOP languages lack the concept of encapsulation, unlike non-OOP languages.
a)
True
b)
False
58.
Python is known for its simple and readable syntax and supports multiple programming paradigms, including OOP.
a)
True
b)
False
59.
C++ is an extension of the C programming language that removes OOP features.
a)
True
b)
False
60.
Java is a dynamically typed programming language.
a)
True
b)
False
61.
OOP focuses on modeling software objects with data and behaviors.
a)
True
b)
False
62.
A class is an instance of an object.
a)
True
b)
False
63.
Encapsulation makes it harder to maintain code and manage data.
a)
True
b)
False
64.
Polymorphism is achieved through the use of abstract classes and interfaces.
a)
True
b)
False
65.
Inheritance is the process of creating a new class from an existing class.
a)
True
b)
False
66.
Encapsulation involves exposing data and methods to the outside world.
a)
True
b)
False
67.
OOP is only used in games and operating systems, not in web applications.
a)
True
b)
False
68.
Paradigm refers to a specific example rather than a pattern.
a)
True
b)
False
69.
OOP makes it easier to create complex objects but doesn't encourage code reuse.
a)
True
b)
False
70.
Objects in OOP only consist of data and not methods.
a)
True
b)
False
71.
OOP allows for creating blueprints for objects called instances.
a)
True
b)
False
72.
Inheritance is the ability of one object to take on different forms.
a)
True
b)
False
73.
Encapsulation helps in preventing unauthorized access to data.
a)
True
b)
False
74.
Polymorphism is achieved by using concrete classes exclusively.
a)
True
b)
False
75.
A class is a collection of data and methods that define the behavior of objects.
a)
True
b)
False
76.
Objects interact with each other in operating systems to perform various tasks.
a)
True
b)
False
77.
Encapsulation involves exposing all data and methods to the outside world.
a)
True
b)
False
78.
OOP is mainly used in web applications and not in games.
a)
True
b)
False
79.
Paradigm refers to a typical example or pattern of something.
a)
True
b)
False
80.
Inheritance is the ability of one class to inherit the data and methods of another class.
a)
True
b)
False
81.
Encapsulation primarily focuses on exposing all class data members for direct manipulation.
a)
True
b)
False
82.
Object-oriented programming (OOP) models real-world objects as software objects.
a)
True
b)
False
83.
Abstraction in OOP makes code more complex and difficult to understand.
a)
True
b)
False
84.
Inheritance allows new classes to inherit properties and methods from subclasses.
a)
True
b)
False
85.
Polymorphism in OOP refers to creating objects that can behave differently in different contexts.
a)
True
b)
False
86.
Modularity involves creating large, monolithic code structures.
a)
True
b)
False
87.
Reusability is a benefit of OOP that allows code to be reused through creating and reusing classes.
a)
True
b)
False
88.
Encapsulation involves converting public variables into private entities.
a)
True
b)
False
89.
OOP stands for Object-Oriented Protocol.
a)
True
b)
False
90.
OOP enhances code scalability by limiting the addition of new features.
a)
True
b)
False
91.
Getters and setters are types of polymorphic methods.
a)
True
b)
False
92.
Encapsulation aims to make implementation details of code visible to users.
a)
True
b)
False
93.
Encapsulation safeguards data integrity by allowing direct manipulation of class variables.
a)
True
b)
False
94.
Inheritance is an OOP concept that promotes code duplication.
a)
True
b)
False
95.
Abstraction involves exposing all implementation details to users.
a)
True
b)
False
96.
Modularity enhances code maintainability and understandability.
a)
True
b)
False
97.
Encapsulation can be achieved by making all class members public.
a)
True
b)
False
98.
OOP doesn't contribute to code reusability.
a)
True
b)
False
99.
Encapsulation converts private entities into public variables.
a)
True
b)
False
100.
Polymorphism allows objects to behave in only one fixed way.
a)
True
b)
False