Homework # 1 (Due Date: Friday October 18, 2013)

Submission:
Submit your homework via E-learning

Deliverables:
One source code file
Name your file as StudentID_LastName_Section#.cpp

Tasks:
Write your own code for the following 4 functions. Add your functions to Practice #1 code

  1. Write a function named Equal that takes two points and returns true if both points are the same (have same x and y coordinates), and returns false otherwise
  2. Write a function named ReversePoints that takes an array points and reverses all points i.e.
    first becomes last
    last becomes first
    second becomes second to last
    second to last becomes second
    and so on...
  3. Write a function named LineWidth that takes a line and returns its length. Line length is computed as follows:
    sqrt ((x2 - x1)2 + (y2 - y1)2)
  4. Write a function named LongestLine that takes an array lines and returns the longest line
    Note: LongestLine returns the longest line not its length
  5. Extend your main function to thoroughly test your functions