Question: c++ program Problem 2 Write another class called St Line which contains 2 points, and a float variable representing the slope and another one for

c++ programc++ program Problem 2 Write another class called "St Line" which contains

Problem 2 Write another class called "St Line" which contains 2 points, and a float variable representing the slope and another one for the y-intercept. Associate your class with the following functions: 05 Write a constructor that takes 2 points. Inside it you should calculate the slope and y-intercept. Write a function "getSlope()" that returns the slope of the line. And another one for y-intercept. Write a function that displays the equation of the line. Write another function "getIntersectionPoint" which takes a line as a parameter and returns a point which represents the intersection between these two lines (if the two lines do not intersect the point should be (-1,-1)

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!