Try spending about an hour and fifteen minutes studying hard, then take a ten minute break. Go get a coke or take a short walk outside, then get back to work for another forty-five minutes or so. Now take a long break. Go to class, go to work, run some errands, and then return to the library and study another subject. Go to class prepared.
Most students attend class most of the time.
The difference between good and mediocre students is that good students go to class prepared . Avoid frantically writing down every word the professor says during a lecture. You cannot expect a lecture to teach you anything unless you have read the material ahead of time. Read a chapter before the lecture. The lecture is going to explain, reinforce, and clarify.