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…
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)- A5% (2)
- B3% (1)
- C90% (36)
- D3% (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
Community Discussion
No community discussion yet for this question.