I too have the same problem with having long days and a dog that cannot hold his bladder for more than 4 hours (he is 14 yrs old, has a severe heart murmur and is on multiple heart medications as well as 2 different diuretics - fortunately he shows very few side effects (amazingly) from his condition and medication and still has an excellent quality of life). Fortunately, I am a veterinary technician(as well as a student) and I can drop my dog off at my work before I go to class and pick him up when I am done (he gets to stay in the receptionist's area and greet people as they come and go).
One thing to consider is a doggy door. If you have a fenced in backyard, dogs that don't try to dig out, dogs that don't bark 24-7, and you have friendly neighbors, a dog door may be the solution. When I am able to purchase a house, that is the first thing I will be buying! The market is pretty good for dog doors - they even have ones that you put a collar on the dog and the door only opens for the dog with the collar on, that way if you have cats they can't just walk out any time they feel like it.
I know several clients at my work who have pet sitters come to their homes daily and walk/let out/play with their dog(s) and even bring them to and from places such as the groomer and our hospital! These clients are also very well off financially and can afford to do this. I think if you can afford a trustworthy pet sitter, that would probably be the ideal thing. But if your budget is like mine, there is no room in it for a pet sitter!
There is also the booming business of doggy daycare. There are many facilities in my city that offer daycare for dogs. Some even pick up your pet and bring them home! These facilities cater to our idea of "doggy fun" by providing swimming pools, playtime with other dogs, "playgrounds" for dogs, or just a nice cool/warm environment (depending on the weather) where your pet can lay on couches and plush pillows and watch TV. These places are also a nice alternative if a person is going to be gone all day and can't get home in a timely manner to let their pet out or if they have a particularly "high energy" pet that becomes bored at home. Again, a nice place for your pet while you are away if you can afford it.
Training your pet(s) to use a litterbox or use wee wee pads after they have been trained to not go in the house can be done, but may be difficult and time consuming. You also have to consider if you want this to be the way for your pet(s) to eliminate (in the house on approved substances or outside). Once your semester is over and you have no need for the litterbox, it may be hard to train your pet(s) to stop going in the house and start going outside again. Probably more time consuming and confusing for your pet(s) than it is worth when there are other alternatives out there that are much more convenient for you and your pet(s)!
I hope this helps and good luck!