B negatively punished parent
Negative punishment is the removal of some stimulas (whining) that decreases the behavior (not buying a candy bar)
In contrast the child is positively reinforced (given a candy bar) for the whining behavior. The reinforcer is added hence it is positive.
Reinforcement increases the probability of the behavior
Positive reinforcement -- adding reinforcer (candy bar)
Negaive reinforcement -- subracting or removing a reinforcer (whining)
Punishment decreases the probability of the behavior, but often has unwanted side effects.
Again adding or giving punishment is positive and subtracting or removing is negative.
The key here is that the whining is a punishment and will get what the child wants right away, but will have probably have side effects that the child did not want.
These are all operant conditioning.
Classically conditioned would be the paring of stimulus to an event such as Pavlov ringing a bell prior to feeding the dogs that elicits an innate or reflex response . The classically conditioned dogs begin to respond to the bell the same as being fed (salivating).
An easy example of this is to find a willing subject and clap your hands (stimulas) just prior to blowing air into their eyes. They will respond by blinking. After 3-5 trials, they will be classically conditioned to respond to the clapping by blinking. Note: the subject can over come the conditioning with effort.