Question: please help me on this I don't have time A straight line is expressed by the equation, y = mx + c where m is
please help me on this I don't have time

A straight line is expressed by the equation, y = mx + c where m is the slope of the line and c is the J-intercept, i.e. the y coordinate of the location where the line crosses the y-axis (see Figure I) y = mx + c hope m y-intercept C Figure I Define a class named Line whose attributes m and c to model a line. Use inline style to define the class. Use the provided template file, main.epp to write your code. The requirements for the program are as follows: 1. Define a constructor that accepts four parameters which are x1. yl, x2, and y2. representing the coordinates x and y of two points that the line passes through. The slope and y-intercept of the line are then calculated by: m = y2-v1 X2-x1 c = yl -mxl Declare this constructor such that it can also serve as a default constructor. In this case, it will model a line that passes through the points (0,0) and (1,I), which should result in m / and c=0. (4 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
