Quantum size effect and quantum tunneling with dissipation as the representation basis of modern nanoelectronics. Part I. Classical and quantum size effects