The effect of terminal nitro and amino groups on the electronic spectra of conjugated hydrocarbon systems