Functions of a noun/pronoun

Functions of a noun/pronoun
A noun can function in the following ways within a sentence.
Subject—It is the someone or something that’s doing the action.
Direct Object—it receives the action
Indirect Object—names the person that receives the direct object. There cannot
be an indirect object in a sentence that has not direct object.
Objective Complement—a word that completes the meaning of the direct object;
an objective complement can be a noun or adjective; nouns will rename the
direct object
Object of the Preposition-- The noun or pronoun at the end of a prepositional
phrase is called the object of the preposition.