Added the necessary methods to Triple_Calc to do Ex 3