The spiral arms in both a spiral galaxy and a barred spiral galaxy are formed by density waves that move threw the forming galaxy. This process is simmilar to spinning a lopsided beach ball into the air. The unbalanced ball wobles as it spins. If the ball was viscus the denser area would begin to pull away forming a spiral arm. An elliptical galaxy is of-course elliptical in shape.
Elliptical galaxies are almost void of interstelar gas and dust .
Thislack of gas and dust inhibits star formation. Irregular galaxies can come in many different shapes. They are put in this group because they don't fit into any of Hubble's other classifications. Irregular galaxies like the three other types are further broken down into more specific groups based on other characteristics. Galaxies are not the largest units in the universe.