IF you stumble upon a carrier or Battleship alone, at night, in fog and IF you are in a perfect attack position with little or no maneuvering THEN and ONLY THEN do you attack said vessels.
Otherwise do what all the other good U-Boat comanders did: Pray they don't spot you. Then find a nice fat, juicy undefended and helpless cargo vessel and blow it all to hell!
I have yet to come across one yet. I did however go looking for trouble around Scarpa Flow(sp?) one day and found it. Saw a lone destroyer (forgot exactly what type) THOUGHT I had a good shot at getting him. Just as I launched my torpedos I hear the pinging...
Well, SIX destroyers later and several near misses and I managed to sneak out of there with minimal damage. I, ummmm, nudge the sea floor a little when I dove too deep.
And no I don't consider myself a wimp. A bully, not a wimp.
I pretty much have the same opinion of aircraft... attacking aircraft in a U-Boat makes for a good movie but in R/L (and this sim) just run and hide.