A rectangular box is to have a square base and a volume of 70 ft3. The material for the base costs 38¢/ft2, the material for the sides costs 10¢/ft2, and the material for the top costs 27¢/ft2. Letting x denote the length of one side of the base, find a function in the variable x giving the cost (in dollars) of constructing the box.