School every day in itself is a struggle for teachers and students. There are many strategies teachers and schools try to perform to keep students engaged and interesting in their education. Speaking at a personal level i learn best when i am not lectured at and are taught a subject of information through interaction and hands on activities. A way to keep kids engaged would be to create fun activities that taught a certain subject area. These tasks would definitely be tough to come up with in a way that interprets the subject initially being taught but it is far more rewarding when students actually understand it.
It is known to be a major problem in class when students come to class late and then decide to pack up their things before the bell rings. If teachers were to make their class day agenda's longer so that it would adequately fill the entire class period students would be forced to stay focused until the bell. Also on those days when students have to work hard as suggested until the very end of class a reward should be given. For example, the next day class period should give the students a little free extra time at the end of class to relax. Or even possibly one of these relaxing last couple minutes once a week. Students appreciate it and it makes them happier to come to class the next day knowing they were given a small brake.
Lastly if students at the beginning of class choose to not pay attention something called "Video Didect" could be used in the classroom. Most of the time if there is an assignment given at the start of class students rush to try and finish it leaving them with time at the end of class without even listening to the instructions first. This program allows the teacher to control the monitors of students so that they are forced to pay attention instead of ignoring the instructions. It will make the computer screen go blank giving the main focus back to the teacher.