Depends on the sex determination system. XY vs ZW vs XO would determine it. XY would mean only female, ZW would mean both, XO would mean both or only one depending. Not sure what sharks are, some fish are ZW.
For the interested, ZW is the inverse of XY, while XO relies on X chromosome count to determine sex.
Like the other comment said, depends on the sex determination system. Which in fish can get complicated -- there are quite a few types of fish which undergo sex changes as a result of the environment they find themselves in. Anglerfish (which become male if they find an adult female early in life, otherwise female) are one well-known example. Clownfish are another: they live in hierarchical groups where the dominant fish becomes the lone female and breeds with the top male. If the female leaves or dies, the previous top male then becomes female and breeds with the previous #2 male.
Sequential hermaphroditism (sex changing) is in a different category. Sex changing fishes still need a partner to have babies. Not the case here.
Another posibilities could be that sperm where provided by other shark species in the same tank (The male DNA being discarded later) or that some chemical compounds where released in the closed water system, triggering the ovocite growth.
Finally, we could hypothesize that some old stored sperm could act as stimulus for oocyte division, even if the male cells were too old and damaged to be functional.
If you want to read some more about sex changing in fishes you can take a look to this article, for example:
P.Valdes, A.Garcia-Alcazar, I.Abdel, M.Arizcun, C.Suarez & E.Abellan. Aquaculture International. 2004, Vol 12(4). Seasonal Changes on Gonadosomatic Index and Maturation Stages in Common Pandora Pagellus erythrinus
Several kinds of fish change sex during their lives (as explained here: https://news.ycombinator.com/item?id=13430247). And in some types of insects any unfertilized egg develops male, allowing a lone female to produce a male offspring to mate with (at which point her fertilized eggs develop female).
And then there are reptile species in which sex is determined by the temperatures the egg is exposed to as the embryo develops. And then... and then...
Sex determination is way more complex and messy than people like to think it is.
I'm blanking on my old biology knowledge that's stored somewhere in the cold storage of my brain haha