S-subject, DO-direct object, SC-subject complement, OP-object of preposition

The valedictory prize will be awarded to whoever has the highest academic rating.

Independent clause

S - prize
DO -- NONE
SC -- NONE

Dependent clause
OP -- whoever has the highest academic rating
S -- whoever
DO -- rating

In the given sentence, "The valedictory prize will be awarded to whoever has the highest academic rating," the grammatical analysis can be done as follows:

- The subject is "The valedictory prize"
- The verb is "will be awarded"
- The direct object is "whomever has the highest academic rating"
- There is no subject complement in this sentence
- There is no object of preposition in this sentence

To identify the subject, verb, direct object, subject complement, or object of preposition in a sentence, you can follow these steps:

1. Identify the subject: The subject is the doer of the action or the topic being talked about. It usually answers the question "who" or "what" before the verb. For example, in the given sentence, "The valedictory prize" is the subject.

2. Identify the verb: The verb is the main action or state of being in the sentence. It is usually a word that shows action or existence. In this sentence, the verb is "will be awarded."

3. Identify the direct object: The direct object receives the action of the verb. It answers the question "who" or "what" after the verb. In this sentence, the direct object is "whoever has the highest academic rating."

4. Identify the subject complement: A subject complement is a word or phrase that follows a linking verb (such as "be") and describes or renames the subject. In this sentence, there is no subject complement.

5. Identify the object of preposition: An object of preposition is the noun or pronoun that follows a preposition (such as "to," "in," "on," etc.) and shows the relationship between the preposition and the rest of the sentence. In this sentence, there is no object of preposition.

By following these steps, you can analyze the grammatical structure of a sentence and identify the different parts of speech and their functions.