Effects of quantum confinement and compositional grading on the band structure of heterojunctions