When +12V comes to A for a moment (pushbutton) circuit will connect D and C, and the consumer which feeds from C will send the +12V signal to the circuit via B. D and C will be disconnected when via B don't come +12V any more.
Not the homework, but the circuit which will help me to make electric windows on my car close and open automatic (my car doesn't have that option, they move as long as I hold the button pressed).
If it looks simple like homework at school to you, then solve it and show me the scheme, please!
You can do this with a self-latching relay. The line for the latching voltage has to be interrupted by some device that will sense when the window has gone all the way up or down. The problem here is that if the sensor gets off, the motor will try to continue running and burn out.
However, most electric windows are "manual hold" for a reason - if someone (like a child) should stick a body part out the window when it was being rolled up, their body part may be snipped off.
It would be one thing to have your windows automatically roll all the way down. Having them automatically roll up could prove very harmful to you and your passengers.