Four hw04 programs