The sharpness differences are probably due to the lenses, not the cameras.
In general, you will find that prime lenses are sharper than zoom lenses, and lenses with short zoom ranges are sharper than lenses with long zoom ranges. So I'm not surprised that the borrowed 7.5x zoom lens is not as sharp as your 4x zoom lens, which in turn is not as sharp as the prime. Lenses also tend to be sharpest when they are stopped down a stop or two from their maximum aperture. So comparing the 35/2 at f/2.8 to the 17-70 at f/2.8 would probably give an added advantage to the 35/2.
You should look up reviews of those 3 lenses online to see how someone else has rated them. Of course it would be best if you could find a site that lists all 3 lenses, so you get a consistent viewpoint, instead of having different reviewers with different techniques.
Also, more expensive lenses typically perform better than cheaper lenses. So if you want a sharp picture, prepare to spend a lot more money. Sharp primes cost as much as not-as-sharp zooms, and the really sharp zooms cost even more. The notable exception, I've heard, is the Canon 50/1.8, which is just over $100, and everyone raves about its sharpness (I haven't used it, myself). It's not as wide as the Nikon 35/2, so it would be tough for you to make direct comparisons between the two, but it would be a relatively inexpensive way for you to get sharper pictures, as well as allow you to take pictures in lower light (e.g. indoors).
There's also the possibility that difference is sharpness is due to camera shake, which is causing blurrier photos. If you want to do a good comparison, you should mount the cameras on a tripod and use a remote shutter release. Otherwise, your camera-holding technique could be influencing the results.
You can get Nikon-to-Canon adapters, which would allow you to mount the Nikon 35/2 on your Canon; they run for between $10 and $40 on eBay, and if you don't mind focusing and setting exposure manually (you would lose the auto focus, and have to shoot in Av or M mode), it would be a cheap way for you to try out that lens with your camera.
I've read that Nikon's philosophy is to have different lenses show colors slightly differently, so you choose a lens partially for how it will capture the scene, while Canon's philosophy is to have all the lenses capture colors about the same and do any color adjustment in-camera. I don't know if that's still true, but here's a link that I used to learn how to change color settings in my Canon 30D; I assume there are similar settings in your 40D: http://www.kenrockwell.com/canon/30d/menus.htm#picture.