add lab4.java provided by TA