Northern Kentucky University Object-Oriented Programming Worksheet


Don't use plagiarized sources. Get Your Custom Essay on
Northern Kentucky University Object-Oriented Programming Worksheet
Just from $13/Page
Order Essay

Consider a right triangle with vertices at (0,0), (0.yı), and (x2,0) as shown in the figure below. Suppose
you are given the coordinates of a test point (x,y). Write a program that prompts the user to enter y1, x2,
x, and y and then checks if the test point is within the triangle. (If it is on one of the edges of the triangle,
it is also considered to be within the triangle.) The coordinates of the vertices and test points may be any
real numbers, including negative numbers.
Submit your source code in a file named In!
Sample console input and output (inputs preceded by »):
Enter the y-coordinate of the first triangle point:
> 100
Enter the x-coordinate of the second triangle point:
> 200
Enter the x- and y-coordinates of the point to test:
The test point is inside the triangle
> 50 25

Purchase answer to see full

Order a unique copy of this paper

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
Top Academic Writers Ready to Help
with Your Research Proposal

Order your essay today and save 30% with the discount code ESSAYHELP