Build an intersection check program user inputs two points


My question is on a java program. i have added all instructions for this homeowrk assignment. from how the input is entered and what the output should read. im seeing if i can get a psuedo code setup for how the algorithm should be setup.

Build an Intersection Check program. User inputs two points as x-y coordinates in twodimension space. Two points represent two end points of a line segment.

Then, user can input second two points for the second line segment. With the two line segments, the program checks whether or not the two line segments intersect.

The program displays "1" if the two line segments are crossing. Otherwise, display "0". Please implement your algorithm in Java but not use API.

Hint: use slop and intercept

Input: Four x-y coordinates that represent two point for the first line segment and two points for the second line segments

Output: 0 or 1 that represents intersection or no intersection

Example Input: 7 8 5 12 10 10 3 10

Output: 1 Do you want to test again? Y

Input: 5 10 5 2 2 1 8 7 Output: 1

Do you want to test again? Y

Input: 10 10 3 10 6 3 6 6 Output: 0

Do you want to test again? Y

Input: 5 4 8 6 10 6 5 1 Output: 0

Do you want to test again? N

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Build an intersection check program user inputs two points
Reference No:- TGS02910739

Expected delivery within 24 Hours