Question: 1. Implement the TriangleArea() function using the Point structure defined in the provided source file. The formula for area of a triangle given three

1. Implement the TriangleArea() function using the Point structure defined in the 

1. Implement the TriangleArea() function using the Point structure defined in the provided source file. The formula for area of a triangle given three points is: 2 Note: The math library function fabs() returns the absolute value of a double. 2. (40 points) Using the same Point structure defined in Problem 1: a. Implement the SwapPoints() function that will swap two Points. b. Implement the PrintPoints() function that prints an array of Points to the screen with one decimal point and one Point (in parentheses) per line. The number of points to be printed is in the count parameter. This is an example of how it should be formatted: (1.1, 2.2) (3.3, 4.4) (5.5, 6.6) 3. (40 points) Given the Student structure defined in the provided source file, implement the two compare functions as specified below. Each function should return: a value 0 (e.g. 1) if the first parameter is greater than the second. For strings, "less" means the string would occur earlier in alphabetical order. You can use the string compare function, strcmp(), from the standard library for strings. Note that it follows the same rules above. a. Implement the CompareName() function to compare two Student records using both the LastName and FirstName members the structures. Last name takes precedence over first name, so for example, "Alice Jones" would be less than "Barbara Jones." b. Implement the Compareld() function to compare two Student structures using the ID member of the structures.

Step by Step Solution

3.43 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

C Program include include include Structure declaration st... View full answer

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 Programming Questions!