java project. partA and partB. yet not complete.