Power Factor Correction Methods In Java