Has law of sines and cosines in java