Line m contains the points, A(–2, 6) and B(4, 8), while line n contains the C(8, 12) and D(x, 24). Given m and n are perpendicular lines, solve for the value of x. Given m and n are parallel lines, solve for the value of x. In your final answer, include all formulas and calculations necessary to solve for x.