Theory:

Subject are predicate are the two parts of a sentence.
Example:
The students are waiting in the class.
«»«»«»«»«»    «»«»«»«»«»«»«»«»«»
    Subject                 Predicate
A subject is a person, animal or a thing that is doing the action or is the focus of the sentence. The sentence revolves around the subject; it tells what the sentence is about. It is usually a noun or a word that takes the place of a noun.
 
A predicate is the part of the sentence that contains the action that the subject does. It usually includes the verb, object/adjective/adverbs (if any).
Let us see a few pictorial examples:
Subject
Predicate
Sentence
Mr.Balu
 
sp teacher.png
is teaching English.
 
sp teaching.png
Mr.Balu is teaching English.
The baby
 
baby.jpg
is sleeping peacefully.
 
baby sleeping.jpg
The baby is sleeping peacefully.
 
Note that always the predicate explains what the subject is doing. The subject and predicate should always pair up perfectly; Otherwise, the sentence will not make sense.
Example:
In the above pictures, if we alternate the subject and predicate, it will read as:
 
The baby is teaching English.
Mr. Balu is sleeping peacefully.
 
Both the sentences do not make sense if we refer to the images.