Wave-Particle Duality and the Photoelectric Effect