Build an intersection check program

Assignment Help Computer Engineering
Reference no: EM132117285

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

Reference no: EM132117285

Questions Cloud

How to create a class rectangle with double attributes : Write a function called main() in the same file to test your Rectangle class . It should prompt the user to enter a length and width of a rectangle.
How a semaphore could be used to implement such a server : Question from OS Sometimes servers wish to limit the number of active connections they have open at any one time.
What is enabled to create incremental backups : What command is used in a backup script to prevent other users from writing to a table while the script is running?
What are the search engines : The development of expert systems is often described as a tedious process. What activities does it typically include?
Build an intersection check program : 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.
Did you come up with the same numbers : Did you come up with the same numbers? What differences do you notice in the method presented in this book as compared with the method you selected?
What is the role of switching in internet : A signal travels through an amplifier, and its power increased and becomes doubled. Then calculate amplification for this condition.
Create a list containing the name of each criminal : Create a list containing the name of each criminal who has been assigned a probation period, which is indicated by the sentence type.
Sort the list alphabetically by probation officer name : Produce a list showing each probation officer's name and his or her supervisor's name. Sort the list alphabetically by probation officer name.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd