nerdexam
CompTIA

FC0-U61 · Question #841

A programmer creates an object to retrieve customer names from a database. Which of the following best describes the object that is retrieving the names?

The correct answer is C. Method. In object-oriented programming (OOP), a method is a function associated with an object and is used to perform operations on that object. When a programmer creates an object to retrieve customer names from a database, the operation that retrieves the names is typically…

Software Development

Question

A programmer creates an object to retrieve customer names from a database. Which of the following best describes the object that is retrieving the names?

Options

  • AVariable
  • BAttribute
  • CMethod
  • DLooping

How the community answered

(40 responses)
  • A
    5% (2)
  • B
    3% (1)
  • C
    90% (36)
  • D
    3% (1)

Explanation

In object-oriented programming (OOP), a method is a function associated with an object and is used to perform operations on that object. When a programmer creates an object to retrieve customer names from a database, the operation that retrieves the names is typically encapsulated in a method. This method might be called something like getCustomerNames() and is responsible for querying the database and returning the results.

Topics

#object-oriented programming#methods#programming concepts

Community Discussion

No community discussion yet for this question.

Full FC0-U61 Practice