[Task] Add solution to the exercise 04

Source codes for the exercise 04 is finalized.