Effect of the degree of disorder on electronic and optical properties in random superlattices