Create Part2.java

Second part of exercise 3