How does a bacteriums cell wall protect it?

the cell wall protects the cell from algae,fungi, and most bacteria