It's not so much the dog doesn't listen, more that he doesn't understand what you want him to do. Go back to basics and don't punish him when he toilets indoors. Double your vigilance and take every opportunity to put him outside to toilet. The crucial thing is to be present when he does toilet in the correct place, so that you can reward him. This makes him keener to repeat the performance to get another treat. Conversely, if you have been telling him off for indoor accidents he may already feel inhibited about going to the toilet in your presence, including when he goes outdoors. This is one reason why it's important not to punish for inappropriate toileting.
As your puppy becomes more reliable about using his toilet area and his bowel and bladder control develops, he can begin to spend more time outside his room or pen with you in the rest of your home. Begin by giving him access to one room at a time. Let him eat, sleep and play in this room but only when he can be supervised. When you cannot supervise him, put him back in his room or pen.
If your puppy is not sleeping in her crate or pen, and is out in the house, you must follow her around to know what she is doing: chewing a bone, running circles, getting a drink of water, etc. In fact, don't take your eye off of her! If you cannot watch her continuously, you must put her back into her pen or crate to prevent potty training "mistakes".
Electronic training involves the use of an electric shock as an aversive. Common forms are collars which can be triggered remotely, or that are triggered by barking, fencing that delivers a shock when a dog wearing a special collar crosses a buried wire, and mats that can be placed on furniture to deliver a shock. Some aids deliver an aversive such as a spray of citronella when triggered. The use of electric shock aversives for training dogs is the subject of considerable controversy. Supporters claim that the use of electronic devices allows training at a distance and the potential to eliminate self-rewarding behaviour, and point out that properly used, they have less risk of stress and injury than mechanical devices, such as choke chains. Opponents cite the risks of physical and psychological trauma associated with incorrect or abusive use.
Observational learning is the learning that occurs through observing the behavior of others. This form of learning does not need reinforcement to occur; instead, a model animal is required. While the model may not be intentionally trying to instill any particular behavior, many behaviors that are observed are remembered and imitated. The domestic dog is a social species and its social dependency makes it aware of the behavior of others, which contributes to its own behavior and learning abilities. There is, however, ongoing discussion about how much, and how, dogs can learn by interacting with each other and with people.
Motivational training has its roots in captive animal training, where compulsion and corrections are both difficult and dangerous, and ignoring bad behavior is not problematic as the animal lives under controlled conditions. As a dog training strategy, purely positive training is feasible, but difficult, as it requires time and patience to control the rewards the dog receives for behavior. Some activities such as jumping up or chasing squirrels are intrinsically rewarding, the activity is its own reward, and with some activities the environment may provide reinforcement such as when the response from dog next door encourages barking.
In considering the natural behaviours of specific breeds of dogs, it is possible to train them to perform specialised, highly useful, tasks. For example, Labrador retrievers are the favoured breed for the detection of explosives. This is because of a combination of factors including their food drive which enables them to keep focused on a task despite noise and other distractions. Most working breeds of dogs are able to be trained to find people with their sense of smell (as opposed to their sense of sight). Cocker Spaniels are able to be trained as part of a termite detection team. Their relatively small size enables them to fit into small spaces, and their light weight allows them to walk on areas of ceiling which would be dangerous to anything heavier. In fact, although unusual, termite detection dogs are much more reliable at detecting termites than humans who rely on a basic system of tapping and listening. Because of their ability to learn signals by sight and for their energetic and athletic natures, German Shepherds are able to be trained for work alongside search and rescue teams and human apprehension teams.
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.