These better submarines were much used during the First and Second World Wars. Many of these better submarines were created by Germany, called U-boats. The submarines were powered by a diesel-electric system. A diesel motor would be used to turn a generator. The generator would charge a large battery while the submarine was on the surface. The power in the battery was then used by the submarine when it went underwater. These submarines were dangerous to enemies. They were hard to see while underwater but it was easy to attack them when they surfaced to recharge. Many modern boats still use this diesel-electric propulsion system.