The equation of a line in standard form is ax + by ¼ c, wherein both a and b cannot be zero, and a, b, and c are real numbers. If b 6¼ 0, then -a/b is theslope of the line. If a ¼ 0, then it is a horizontal line, and if b ¼ 0, then it isa vertical line. The slope of a vertical line is undefined. Two lines areparallel if they have the same slope or both are vertical lines. Two lines areperpendicular if either one of the lines is horizontal and the other is verticalor the product of their slopes is -
1. Design the class lineType to store aline. To store a line, you need to store the values of a (coefficient of x), b(coefficient of y), and c. Your class must contain the following operations.
a. If a line is nonvertical, then determine its slope.
b. Determine if two lines are equal. (Two lines a1x + b1y ¼ c1 and a2x +b2y ¼ c2 are equal if either a1¼ a2, b1¼ b2, and c1¼ c2 or a1¼ ka2,b1¼ kb2, and c1¼ kc2 for some real number k.)
c. Determine if two lines are parallel.
d. Determine if two lines are perpendicular.
e. If two lines are not parallel, then find the point of intersection.