Implementation of P2.java and adding files