Make sure to create the new device like var device = new Smartphone();.
var device = new Smartphone();