Question: Object - Oriented VS . Functional: There are three types of line segments, horizontal, vertical or oblique. Verify whether a line segment is horizontal, vertical
ObjectOriented VS Functional:
There are three types of line segments, horizontal, vertical or oblique. Verify whether a line segment is horizontal, vertical or oblique. From this diagram we can understand that:
For Horizontal lines, the y coordinate values of two endpoints are same.
For Vertical lines, the x coordinate values of two endpoints are same.
For Oblique lines, the x y coordinates of two endpoints are different.
Write a program, for given two points, calculate the logic to verify it is Horizontal line, Vertical line or Oblique line. Implement this by using three paradigms: Object oriented ProgrammingC Functional ProgrammingF# and Logic Programming SWIProlog
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
