Created a calcutor in java for four major operations