If a cube has a volume of 30 cubic centimeters and a mass of 90 g, what is the density?