Question: Object - Oriented VS . Functional: There are three types of line segments, horizontal, vertical or oblique. Verify whether a line segment is horizontal, vertical

Object-Oriented 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 Programming(C++), Functional Programming(F#) and Logic Programming (SWI-Prolog).
Object - Oriented VS . Functional: There are

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