Object Functions and Class Methods Quiz

Object Functions and Class Methods Quiz

Assessment

Interactive Video

Computers

9th - 10th Grade

Hard

Created by

Jennifer Brown

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary purpose of an object function in a class?

To store data

To add functionality to an object

To initialize variables

To delete an object

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the role of a constructor in a class?

To delete an object

To initialize a new object

To update object attributes

To add new methods

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which attribute is NOT part of the student class described?

General Average

Grade Level

Name

Age

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the minimum general average required for a student to receive 'with honors'?

85

90

95

98

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which conditional statement is used to check if a student has 'highest honors'?

General average > 95

General average < 90

General average >= 98

General average <= 98

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the return type of the 'get honor' function?

Boolean

Integer

Float

String

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What library is included to use string streams in the self-introduction function?

fstream

iostream

iomanip

sstream

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?