Answer to Question #64693 in C++ for Natalie
Function should throw an exception if two lines are same or are parallel and hence have no point of intersection. For this, you will need subclasses EqualLines and ParallelLines of the class RunTimeException (declaration on page 97 of the text). The message part of the exceptions should be "The lines are equal: infinite intersection" for EqualLines and "The lines are parallel: no intersection" for ParallelLines. When either exception is caught, the messages will be printed. This will occur in the program that uses the Line class. The class methods should not produce any output.
Need a fast expert's response?Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!