Use the following equations to find the amount of males and females in the class:
![x + y = 28](https://img.qammunity.org/2019/formulas/mathematics/college/wmcyzqc9sba4jyclv38fnv7pg5m8eti75z.png)
![x = y + 4](https://img.qammunity.org/2019/formulas/mathematics/college/c14liuow3r4uo5ujn0yhsasojd1582iwfp.png)
x represents the males in the class, and y represents the females in the class.
Because x = y + 4, we can substitute x in the first equation:
![x = y + 4](https://img.qammunity.org/2019/formulas/mathematics/college/c14liuow3r4uo5ujn0yhsasojd1582iwfp.png)
![y + 4 + y = 28](https://img.qammunity.org/2019/formulas/mathematics/college/o3qr1bp0cvhwif5pc1e2qulcld11swqirn.png)
Combine like terms.
![2y + 4 = 28](https://img.qammunity.org/2019/formulas/mathematics/college/c1t9idmlf1v9y3wyj51tkxbre8u1kqzhwe.png)
Subtract 4 from both sides.
![2y = 24](https://img.qammunity.org/2019/formulas/mathematics/college/ds236e4o1vmt9tgk3lgf2qgyjwhnk1ju1d.png)
Divide both sides by 2 to get y by itself.
![y = 12](https://img.qammunity.org/2019/formulas/mathematics/college/vyu907866da1yxid2z9xfw31cys30zzgg6.png)
Because we know what y is, we can plug in its value into the first equation:
![x + 12 = 28](https://img.qammunity.org/2019/formulas/mathematics/college/7z644lq67atipgq9wy21yc7d2w50dora0e.png)
Subtract 12 from both sides to get x by itself.
![x = 16](https://img.qammunity.org/2019/formulas/mathematics/college/f8masn3utcvaqcp9hf4lalr53x1tkiq7bl.png)
There are
16 males and 12 females in the class.