Question: I am only given one hour to code this. [NOTE : NO arrays, pointers, recursion and strings should be used in this code.] 1) How

![NO arrays, pointers, recursion and strings should be used in this code.]](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f4602bc35c4_43566f4602b41185.jpg)
I am only given one hour to code this. [NOTE : NO arrays, pointers, recursion and strings should be used in this code.] 1) How do I go about doing this is under an hour? Please include some thought processes. 2) What's the best way to savage the maximum amount of marks if I don't complete this in under an hour?
Exercise 1: Lines [50 marks Problem Statement In 2D geometry, given 4 distinct points A, B, C and D on a plane, the two lines, AB and CD, can be parallel no intersection, intersecting (exactly one intersection or overlapping (infinite intersections). D(2,1 (3, 41 C 12,- C12.2) 0.2 c1L 2) :U, 1) Parallel Intersecting Overlapping One way to determine which case it is (without calculating the number of intersections] is to make use of the slopes of AB, CD and AC The slope k of a line can be calculated using the following formula: where (x1, y) and X2, y2) are the coordinates of two distinct points on the line. Based on the slopes of the lines, AB and CD are: Parallel if the slopes of AB and CD are the same but different from that ot AC. Intersecting if the slopes of AB and CD are different. Overlapping if the slopes of AB, CD and AC are the same . Write a program to 1 read in the coordinates of the 4 points (all of int type, 2) determine whether the two lines AB and CD are parallel, intersecting or overlapping, and 3l print a message accordingly Write on the skeleton file line.c given to you. You need to include three functions determineType): This function takes in the coordinates of 4 points and determines whether the two lines are parallel, intersecting or overlapping. computeK(): This function takes in the coordinates of two distinct points on a line and computes the slope of the line. printMessage(): This function prints a message based on whether the two lines are parallel, intersecting or overlapping. You are to decide the appropriate parameters and return types for these functions. You may define additional functions as needed. You need to define constants for the three different types(e.g.,1 for parallel, 2 for intersecting, and 3 for overlapping) and use them in the program. You may assume that the inpts valid i.e., al the coordinates are integers)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
