Java project to calculate electricity consumption