design a class Line that implements a line, which is represented by the formula y = ax+b. Your class should store a and b as double member variables. Write a member function intersect(ℓ) that returns the x coordinateat which this line intersects line ℓ. If the two lines are parallel, then yourfunction should throw an exception Parallel. Write a C++ program thatcreates a number of Line objects and tests each pair for intersection. Yourprogram should print an appropriate error message for parallel lines.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here