Hint: The direct object of a sentence is the noun or noun phrase that receives the verb's action. As compound means formed by more than one, it involves two or more direct objects in a sentence.
Complete answer: When more than one noun, pronoun, or group of words acting as a noun receives the action of the same transitive verb, it is called a compound direct object. For example, in the sentence: Riya ate an ice-cream. The subject- Riya, performs the action “ate” i.e., a verb, on only one object “ice-cream”. Therefore, this sentence is an example of a sentence with a direct object.
Now taking the example of another sentence: Riya ate a chocolate and an ice-cream. The subject- Riya, performs the action “ate” i.e., a verb, on more than one nouns- “chocolate” and “ice-cream. Therefore, this sentence is an example of a compound direct object as the verb is acting on multiple nouns. (In this case, the two direct objects- “chocolate” and “ice-cream” make up the compound direct object.
Note: It should be carefully observed that not all sentences with multiple nouns as objects are examples of compound direct objects. It is essential for a single verb to apply on multiple objects for this to happen. For example, in the sentence: Riya ate chocolate and drank water. Although, there are two different objects – “chocolate” and “water” for the same subject, they are not the functions of the same noun. The noun “chocolate” is a function of the verb “ate” and the noun “water” is a function of the verb “drank”. Hence, as there is no single verb having two or more different nouns as its function in this sentence, it is not an example of compound direct object.