Why did Romans create a written code of law?

Why did Romans create a written code of law?

a. to confuse their enemies and block invasions
b. to allow citizens to see and understand the law
c. to spread literature throughout the republic
d. to serve as the basis for a new religion