Question: USING PHP QUESTION (1): It is known that any straight line passes through two points: Point1 is (X1,y) and Point2 is (X2,y2). Given that the

USING PHP QUESTION (1): It is known that any straight line passesUSING PHP

QUESTION (1): It is known that any straight line passes through two points: Point1 is (X1,y) and Point2 is (X2,y2). Given that the length and the shape of a line is determined as: Length= V(x1 - x2)2 + (y1 - y2)2 Shape: it is one of the four following shapes... "Horizontal Line Vertical Line" "Diagonal Line" "Point - not a line" (x1,71) (x1,y1) (x1,y) (11,71) (x2,y) (x2,2) (x2,72) Same y-values but Same x-values but Different x-values and Same x-values and different x-values different y-values different y-values same y-values Write a program that defines two functions to determine each of the length and the shape of a straight line. The program then calls these two defined functions to print the length and shape of the line. For instance: Input x + Line Info x ECO localhost:8080/Prog2- + + C 0 localhost:8080/ Enter (1,7) values for the two points: Line Length: 5 cm First Point Second Point x2: 12 y2: 18 Line Shape: Diagonal line yl: 15 Print Info

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!