TOC final project (java)