Copied Kursbok4.java from chapter 4 (Task 1)