Search Header Logo

Topic 2 APP Quiz

Authored by Izzati Safwanah

Information Technology (IT)

Professional Development

Used 3+ times

Topic 2 APP Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is encapsulation in Object-Oriented Programming (OOP)

Grouping related methods and variables in a single unit

Allowing access to methods and variables from anywhere in the program

Hiding the internal details of an object and exposing only what is necessary

A technique to define multiple methods with the same name

2.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which access modifier is typically used to achieve encapsulation?

public

private

protected

final

3.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is the main purpose of inheritance in OOP?

To create private variables

To reuse existing code in new classes

To make variables accessible everywhere

To declare methods with the same name

4.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Encapsulation helps in improving the maintainability and flexibility of code

True

False

5.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

A subclass automatically inherits private fields from its superclass

True

False

6.

FILL IN THE BLANK QUESTION

1 min • 2 pts

In inheritance, the class that inherits from another class is called the _________________.

7.

FILL IN THE BLANK QUESTION

1 min • 2 pts

Encapsulation is achieved using ___________ fields and providing ______________ methods to access them.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?