Sentences are composed of several components. These components include the subject, the predicate, the direct and indirect object, the compliments, phrases and clauses.
The subject is a noun or pronoun that tells what or who the sentence is about.
The predicate includes the verb and other words that tell what the subject is doing or what the subject is like.
The baby sleeps soundly at night.
xxx(subject- baby, predicate- sleeps soundly at night)
A direct object is a noun or pronoun that receives the action of a main verb. The subject of the sentence
does something to the object. Direct objects usually answers the question ‘who’ or ‘what’ about the verb. .
An indirect object is a noun or pronoun that benefits from the action of a main verb. The indirect object refers to a person or thing who receives the direct object. Indirect objects usually answer the questions ‘to or for what’ or ‘to or for whom’.
I gave my wife a diamond neclace for her birthday.
xxx(direct object- diamond necklace, answers the question ‘What was given?’)
xxx(indirect object- wife, answers the question ‘To whom was it given?)
For more information about the direct and indirect objects take a look at
An explanation of the different sentence components and the functions of the subject, predicate and objects– www.understandinggrammar.com