wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

OOP- Quiz #1

Total questions: 55

Worksheet time: 34mins

Name
Class
Date
1.

It is programming about writing procedures or methods that perform operations on the data.

(a)  

2.

It is programming about creating objects that contain both data and methods.

(a)  

3.
  • Object-oriented programming has several advantages over procedural programming and one is not faster and easier to execute. TRUE/ FALSE

a)
  • TRUE

b)
  • FALSE

4.
  • Object-oriented programming has several advantages over procedural programming. It helps to keep the Java code DRY "Don't Repeat Yourself", and makes the code easier to maintain, modify and debug. TRUE/ FALSE

a)
  • TRUE

b)
  • FALSE

5.
  • Object-oriented programming has several advantages over procedural programming. It provides a clear structure for the programs. TRUE/ FALSE

a)
  • TRUE

b)
  • FALSE

6.
  • Object-oriented programming has several advantages over procedural programming. OOP Makes it possible to create full reusable applications with less code and shorter development time. TRUE/ FALSE

a)
  • TRUE

b)
  • FALSE

7.

A principle is about reducing the repetition of code.

(a)  

8.

is a blueprint or a template for creating objects.

(a)  

9.

These are variables that hold data related to a class and its objects.

(a)  

10.

These are functions defined inside a class that describe the behaviors or actions that an object can perform.

(a)  

11.

It is an instance of a class. When a class is defined, no memory is allocated.

(a)  

12.

are fundamental to organizing and structuring code in a way that is reusable, scalable, and easier to maintain.

(a)  

13.

are the two main aspects of object-oriented programming.

(a)  

14.

When the individual objects are created, they inherit all the variables and methods from the class. TRUE/ FALSE

a)

TRUE

b)

FALSE

15.

Remember from the java syntax that a class should always start with a lowercase first letter, and that the name of the java file should match the class name.. TRUE/ FALSE

a)

TRUE

b)

FALSE

16.

an object-oriented programming language.

(a)  

17.

To create a class, use the keyword (a)   .

18.

To create an object of (a)   , specify the class name, followed by the object name, and use the keyword new:

19.

To create an object of Main, specify the class name, followed by the object name, and use the keyword (a)   :

20.

You can also create an object of a class and access it in another class. This is often used for better organization of classes (one class has all the attributes and methods, while the other class holds the main() method (code to be executed)).

a)

Using Multiple Classes

b)

Using Single Class

c)

Classes

d)

Objects

21.

Use myObj to access and print the value of the x attribute of MyClass.

(a)  

22.

Call myMethod on the object.

(a)  

23.

Another term for class attributes is (a)   .

24.

You can access attributes by creating an object of the class, and by using the (a)   syntax

25.

is a branch of artificial intelligence (AI) that focuses on building systems that can learn from data, identify patterns, and make decisions with minimal human intervention

(a)  

26.

_________ are used to store up temporary data to be used in our program's runtime.

a)

Datatype

b)

Identifiers

c)

Variables

d)

Data

27.

The type of data inside our variable.

a)

Data

b)

Variables

c)

Identifiers

d)

Data Type

28.

_________ are used to store up temporary data to be used in our program's runtime.

a)

Datatype

b)

Identifiers

c)

Variables

d)

Data

29.

The type of data inside our variable.

a)

Data

b)

Variables

c)

Identifiers

d)

Data Type

30.

It is the name of the variables that the programmer indicated and it is used to read and write to the variable.

a)

Identifiers

b)

Datatype

c)

Variables

d)

Concatenation

31.

The process of joining strings together with the plus operator.

a)

Identifiers

b)

Concatenation

c)

Datatypes

d)

Variables

32.

Syntax in declaring variables

a)

identifier datatype;

identifier datatype = value;

b)

datatype identifier

value = identifier datatype;

c)

datatype identifier

value identifier = datatype;

d)

datatype identifier;

datatype identifier = value;

33.

Syntax in reassigning variables

a)

identifier = value

b)

identifier = value;

c)

value = identifier

d)

value = identifier;

34.

Which of the ff. is an example of Concatenation

a)

"Hello" + "World"

b)

2 + 3

c)

'a' + 3

d)

Hello + World

35.

You can concatenate ________ a variable

a)

Beside

b)

Inside

c)

Outside

d)

All of the above

36.

We can display a variable's value by indicating its identifier inside the parenthesis.

a)

System.outprintIn();

b)

System.out.printIn;

c)

System.out.printIn()

d)

System.out.printIn();

37.

You can use numbers but with letters.

a)

Rule of Identifier

b)

Rule of Concatenation

c)

Rule of Declaring Variables

d)

Rule of Reassigning Datatypes

38.

What is the purpose of a RadioButton control?

a)

To allow multiple selections at once

b)

To display a single option from a group of choices

c)

To display text only

d)
  1. To display images only

39.

What is the purpose of a RadioButton control?

a)

To allow multiple selections at once

b)

To display a single option from a group of choices

c)

To display text only

d)
  1. To display images only

40.
  1. When a user clicks on a RadioButton, what happens to other radio buttons in the same group?

a)

They become disabled

b)

They become checked

c)

They become unchecked

d)
  1. They become invisible

41.

Which property of a RadioButton determines its current state?

a)
  1. Checked

b)

Selected

c)

Enabled

d)

Visible

42.

How does a RadioButton differ from a CheckBox?

a)

RadioButton allows multiple selections; CheckBox allows single selection

b)

RadioButton allows single selection; CheckBox allows multiple selections

c)
  1. RadioButton has no visual difference from CheckBox

d)

RadioButton is used for displaying images only; CheckBox is used for displaying text

43.

Which event is triggered when a RadioButton's state changes?

a)

Click

b)

CheckedChanged

c)

 SelectedIndexChanged

d)

CheckedStateChange

44.

Can a RadioButton display both text and images simultaneously?

a)

Yes

b)

No

45.

How can you programmatically check a RadioButton using C#? 6

a)

radioButton.IsChecked = true;

b)

radioButton.Selected = true;

c)

radioButton.Checked = true;

d)

radioButton.Enabled = true;

46.

Which control allows the user to select multiple options at once

a)

RadioButton

b)

CheckBox

c)

ListBox

d)

ComboBox

47.

Which method is used to add items to a ListBox dynamically

a)

AddItem()

b)

InsertItem()

c)

Add()

d)

Insert()

48.

How can you retrieve the currently selected item in a ListBox as a string variable? 9

a)

listBox.SelectedText

b)

listBox.SelectedItem

c)

listBox.Text

d)

listBox.SelectedValue

49.
  1. Which method is used to remove an item from a ListBox based on its index?

a)

Remove()

b)

Delete()

c)

RemoveAt()

d)

DeleteAt()

50.
  1. : What property of a ListBox determines whether items are sorted alphabetically?

a)
  1. Sorted

b)

IsSorted

c)
  1. SortEnabled

d)

IsSortedAlphabetically

51.

What is the purpose of a ComboBox control in C# Windows Forms applications?

a)
  1. To display a text box combined with a ListBox

b)

To allow multiple selections from a list of items

c)
  1. To provide a drop-down list of options for user selection

d)

To display images only

52.

What is the purpose of grouping RadioButton controls?

a)

To limit the number of selections

b)

To visually organize them on the form

c)

To make them behave as a single entity

d)

To apply a common style to them

53.

What is the name of the Speaker last Tuesday May 21, 2024 (Cyber Security)

(a)  

54.

The Object Oriented paradigms suggest we should model instructions in a computer program with the data they manipulate and store these as components together.

a)

TRUE

b)

FALSE

55.

A 'Class' is a software design w/c describes the general properties of something w/c the software is modelling.

a)

TRUE

b)

FALSE