
PHP8: Encapsulation and Abstraction

Quiz
•
Computers
•
12th Grade
•
Hard
Arnold Nasir
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the four principles of object-oriented programming mentioned in the text?
Encapsulation, Inheritance, Functions, Variables
Encapsulation, Abstraction, Inheritance, Polymorphism
Abstraction, Polymorphism, Classes, Objects
Encapsulation, Data Types, Inheritance, Functions
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does encapsulation do in object-oriented programming?
Hides all methods from the user
Allows direct access to all properties
Bundles data and methods within one unit
Increases the complexity of the code
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which visibility access modifier means that a property can only be accessed from within the class?
Public
Private
Protected
Static
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a potential issue with setting a property to public?
It makes the property read-only
It can break encapsulation
It allows for method chaining
It hides the property from other classes
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a getter method used for?
To retrieve the value of a property
To change the value of a property
To create a new property
To delete a property
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the main concern with using getters and setters?
They are not compatible with private properties
They can break encapsulation
They are always necessary
They slow down the program
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does abstraction in object-oriented programming refer to?
Creating multiple classes
Making all properties public
Hiding internal implementation details
Using only private methods
Create a free account and access millions of resources
Similar Resources on Wayground
13 questions
Photoshop Basic Terms

Quiz
•
8th - 12th Grade
10 questions
HTML QUIZ - Advanced

Quiz
•
9th - 12th Grade
20 questions
1Mx-Review Quiz

Quiz
•
9th Grade - University
12 questions
Java Class vocabulary

Quiz
•
9th Grade - University
15 questions
1.2.4 Types of Programming Language

Quiz
•
12th Grade
15 questions
Introduction of Flash

Quiz
•
12th Grade - University
10 questions
CompSci12-Review-Term2-Week6-Day3

Quiz
•
12th Grade
16 questions
Wiltshire General Knowledge

Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade