I wonder if you have the idea that a transmitter being on or off is like a light being on or off. It is not like that.
A transmitter must transmit something - perhaps an ID number. If 2 transmitters transmit at the same time on the same frequency the receiver will only see garbage. If you want the transmitters to work on different frequencies then you need a separate receiver for each transmitter.
You can't start writing a program until you have decided what you want the program to do.
First thing is to write down in plain language the series of detailed steps (one on each line) for exactly how you want the system to work. When you have done that it is likely that the series of steps will form the framework for the program.
but what is 'Master Slave System', i'm not from an electronics background.
Did you read Replies #9 and #10 ?
In a master-slave system the slaves are listening all the time. The master sends a message with the ID for one of the slaves and the slave replies saying whether the switch was pressed or not. Then the master sends a message for the next slave. It means that the slaves only transmit when asked to do so.