this is my last year programming porject. code in java