My GSD puppy is 15 weeks now and will sit at the door and bark when he needs to go outside. I did not teach him to do this. I just watched him very close in the first couple weeks of getting him and when I thought he needed to go outside I would walk him to the door and tell him to sit and say "Potty Outside" then I would take him out. He got the hints over a span of a couple weeks and now he associates sitting at the door as meaning "I have to go outside". He will now sit at the door and if I don't get up right away or if I'm in the next room he will bark.
"The more people I meet, the more I like my dog"