Implementation of calculating Doubles in class ship.