"4 7/8 yards is almost 5 yards. To make certain that you have enough fabric, round up. <span>3 dresses at 5 yard each is 15 yards."</span>
If the two sides with length 3 and 4 are the two legs, then the missing side, i.e. the hypotenuse, is indeed 5.
But it could also be the case that 4 is the hypotenuse and 3 is one of the legs. In this case, the missing side is the other leg, so we calculate it using

So, a right triangle with legs
and 3 has an hypotenuse of 4.