It typically takes 4-6 months for a puppy to be fully house trained, but some puppies may take up to a year. Size can be a predictor. For instance, smaller breeds have smaller bladders and higher metabolisms and require more frequent trips outside. Your puppy's previous living conditions are another predictor. You may find that you need to help your puppy break old habits in order to establish more desirable ones.
A training class is not there to train your dog. Its purpose is to teach you to train your dog so you will need to be committed to train your dog for short sessions (5 minutes) several times a day rather than just simply turn up for classes! This little bit of training everyday will be repaid with a lifetime of living with a well behaved dog. You will also learn to avoid problems before they begin as well as receive help to overcome any that you already have with your dog.