stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Object-Oriented Programming Concepts Flashcards | StudBud
Explore
/
Object-Oriented Programming Concepts
Object-Oriented Programming Concepts
23 terms
·
StudBud Administration
·
4 plays
Test your knowledge on the fundamental concepts of Object-Oriented Programming
Flashcards
23 cards
F
Practice quiz
P
Host live
L
Questions
23
Answers
1
True or false: Inheritance allows code reuse.
False
True
2
True or false: A class can implement multiple interfaces.
True
False
3
True or false: Interfaces can contain method implementations.
False
True
4
What is method overriding?
Hiding methods
Redefining a method
Deleting methods
Creating new methods
5
Which of these is a characteristic of inheritance?
No relationships
Random structure
Only one level
Hierarchical structure
6
True or false: Polymorphism can simplify code.
True
False
7
True or false: A subclass can access private members of a superclass.
True
False
8
What is the result of upcasting?
Wider access
More errors
Narrower access
No access
9
What does downcasting require?
Memory allocation
Static typing
Type checking
No checks needed
10
What is polymorphism in OOP?
Multiple forms of objects
Static binding only
Single form of objects
Dynamic memory allocation
11
Which of these is not a feature of OOP?
Inheritance
Global variables
Abstraction
Encapsulation
12
Which of these is a benefit of polymorphism?
Less code reuse
Code flexibility
Increased complexity
More errors
13
What is the main advantage of inheritance?
More code
Less flexibility
More complexity
Code reusability
14
What does a superclass provide?
Common properties
No properties
Unique properties
Only methods
15
True or false: Polymorphism can be achieved through method overloading.
False
True
16
True or false: A subclass can override a method.
True
False
17
True or false: Upcasting is always safe.
True
False
18
What does encapsulation achieve?
Increased complexity
Data exposure
Code duplication
Data hiding
19
Which of these is an example of upcasting?
Class to object
Child to parent
Object to class
Parent to child
20
Which keyword is used for inheritance?
includes
extends
inherits
implements
21
Which of these is a type of polymorphism?
Static only
Dynamic only
Compile-time
Run-time only
22
What is the main purpose of interfaces?
Store data only
Increase complexity
Implement inheritance
Define contracts
23
True or false: Downcasting can lead to runtime errors.
False
True