
Program_3
Quiz
•
Engineering
•
Professional Development
•
Practice Problem
•
Medium
Ms C
Used 2+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
1. What is the purpose of the raiseSalary() method in the Employee class?
a) To set a new salary directly
b) To increase the salary by a given percentage
c) To print the salary details
d) To decrease the salary
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the access modifier for the instance variables id, name, and salary?
a) public
b) private
c) protected
d) default
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to create an object of the Employee class?
a) this
b) new
c) super
d) create
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which concept of OOP is shown by using private variables and public getter methods?
a) Inheritance
b) Encapsulation
c) Polymorphism
d) Abstraction
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the this keyword refer to inside the constructor?
a) The parent class
b) The current object of the class
c) The static variable
d) The superclass
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method automatically executes when an object is printed?
a) print()
b) display()
c) toString()
d) show()
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which part of the program demonstrates data hiding?
a) Private variables with public getters
b) Printing salary
c) Using toString()
d) Using new keyword
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
KUIS BULAN K3 UP3 TAHUNA
Quiz
•
Professional Development
10 questions
Safety General Knowledge Quiz
Quiz
•
Professional Development
10 questions
Basic Electricity
Quiz
•
Professional Development
10 questions
RBT TINGKATAN 2
Quiz
•
Professional Development
10 questions
Examen de Circuitos Secuenciales
Quiz
•
Professional Development
10 questions
Mastering Python Programming Concepts
Quiz
•
Professional Development
10 questions
MCQs on Business Models in India
Quiz
•
Professional Development
13 questions
Review phase 4
Quiz
•
Professional Development
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
