Refactor the Calculator class to use a builder-style constructor