Functions that returns information about an object’s state can be classified as ________ A. inspector functions B. mutator functions C. auxiliary functions D. manager functions

inspector functions
mutator functions
auxiliary functions
manager functions

The correct answer is A. inspector functions.

Inspector functions are functions that return information about an object’s state. They are also known as accessor functions or getter functions.

Mutator functions are functions that change the state of an object. They are also known as setter functions.

Auxiliary functions are functions that support the main functionality of a program. They are also known as helper functions.

Manager functions are functions that manage the resources of a program. They are also known as resource management functions.

Here is an example of

an inspector function:

python
def get_name(object):
return object.name

This function returns the name of the object.

Here is an example of a mutator function:

python
def set_name(object, name):
object.name = name

This function sets the name of the object.

Here is an example of an auxiliary function:

python
def validate_input(input):
if not input.is_valid():
raise ValueError("Invalid input")

This function validates the input.

Here is an example of a manager function:

python
def open_file(filename):
with open(filename, "r") as f:
return f

This function opens a file.