Quiz on Classes, Objects, and Methods

Quiz on Classes, Objects, and Methods

11th Grade

14 Qs

quiz-placeholder

Similar activities

RO93 - iMedia - Primary Research

RO93 - iMedia - Primary Research

9th - 12th Grade

13 Qs

Fundamentals of Computing Vocab. Part 1

Fundamentals of Computing Vocab. Part 1

9th - 11th Grade

17 Qs

Java Class Vocabulary

Java Class Vocabulary

11th Grade - University

17 Qs

Parts of a Method (Java)

Parts of a Method (Java)

9th Grade - University

16 Qs

BTEC DIT C3 LAA - Cloud Computing

BTEC DIT C3 LAA - Cloud Computing

10th - 11th Grade

10 Qs

Java Class vocabulary

Java Class vocabulary

9th Grade - University

12 Qs

Python Variable Scope and Stack Frames

Python Variable Scope and Stack Frames

11th Grade

9 Qs

BTEC DIT - C3 - B2 - Protecting Data

BTEC DIT - C3 - B2 - Protecting Data

11th Grade

10 Qs

Quiz on Classes, Objects, and Methods

Quiz on Classes, Objects, and Methods

Assessment

Quiz

Computers

11th Grade

Easy

Created by

Myca Pacibo

Used 1+ times

FREE Resource

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are instance variables?

Variables that can only be accessed by the main class

Variables declared outside any method

Variables that are always public

Variables declared within a method

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of methods in programming?

To declare variables

To hide information

To group statements for a specific task

To store data permanently

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'this' keyword refer to?

The variable being declared

The object receiving a method call

The method being called

The class itself

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Where are local variables declared?

Within a class

Within a method definition

Outside any method

In the main class only

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is information hiding?

Hiding all methods from users

Restricting access to some object components

Making all variables public

Allowing full access to all methods

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are public modifiers?

Modifiers that are only used in constructors

Modifiers that allow unrestricted access

Modifiers that restrict access

Modifiers that are always private

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an accessor method?

A method that deletes data

A method that creates new variables

A method that returns data from a private variable

A method that changes data

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?