Replacement Cost Method Example Java