Starting and controlling Arduino via toggle switch

We have a program setup on our project in class..... we are wanting to make the sequence start via the flip of a toggle switch..... we are gonna power it off the arduino itself and then run it as an input.... we want this to stut down the whole program..... how would we go about putting this into our program and what not.....

Are you looking for something like this...