Q:

The use of the verb abstract in a question

Is this correct?
What Java object type would abstract the number of apples to?
The context: An apple or another real-world object can be abstracted into a specific object in the Java programming language. I am trying to ask the other person what Java object type they would use abstract to.

A:

Grammatically speaking - the verb needs a subject.
What Java object type would you abstract the number of apples to?
Alternatively you can put it in the passive voice:
What Java object type would the number of apples be abstracted to?
On more of a technical level, I probably wouldn't use abstract for assigning a simple count of the number of objects, only when there is more indirection at play.  But I assume this is just a simplified example for the sake of the English question, and the real situation is a more complex refactoring.

