Adding modules with trait objects Imagine that you want to add a camera to your computer which is lacking one. You buy a webcam and connect it via a USB port. Now imagine that you want to add storage to the same computer. You buy an external hard drive and also connect it via a similar USB port. This is the power of generics applied to the world of physical gadgets. A USB port is a generic port, and an accessory that connects to it is a module. You don't have device-specific ports, such as a specific port for a

This page is for premium members only.