Question: In C++ Write a program to test the classes pointType and lineType defined in Exercise 30 of this chapter. Add a member function to the

In C++

Write a program to test the classes pointType and lineType defined in Exercise 30 of this chapter. Add a member function to the class lineType to find the point of intersection of two lines if they are not parallel.In C++ Write a program to test the classes pointType and lineTypedefined in Exercise 30 of this chapter. Add a member function tothe class lineType to find the point of intersection of two lines

#include "pointType.h" class LineType public void setLineCoordinates(double a10, double b1 0, void setLineCoordinates (pointType& p1, void getLineCoordinates(pointType& p1, pointType& p2); double slope(); double a2 = 0, double b2 = 0); potntType& p2); // If line is vertical, then the function // returns-999999999999999 void lineEquation): bool isVerticalLine); bool isHorizontalLine; bool parallel(lineType&l); pointType intersectionPoint(lineType&1) lineType(double a 0, double b1-0, lineType(pointType& p1, pointType& p2); double a2 = 0, double b2 = 0); private: pointType a; pointType b; I; #include "pointType.h" class LineType public void setLineCoordinates(double a10, double b1 0, void setLineCoordinates (pointType& p1, void getLineCoordinates(pointType& p1, pointType& p2); double slope(); double a2 = 0, double b2 = 0); potntType& p2); // If line is vertical, then the function // returns-999999999999999 void lineEquation): bool isVerticalLine); bool isHorizontalLine; bool parallel(lineType&l); pointType intersectionPoint(lineType&1) lineType(double a 0, double b1-0, lineType(pointType& p1, pointType& p2); double a2 = 0, double b2 = 0); private: pointType a; pointType b

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!