Ultraviolet and optical spectral variability in the Be star. gamma. Cassiopeiae: A coronal model for the emission