Consider a typical two-dimensional graph from mathematics


Consider a typical two-dimensional graph from mathematics. The graph has four quadrants which are numbered counterclockwise from the upper right:  first quadrant (upper right) if both x and y are positive , second quadrant (upper left) if x is negative and y is positive , third quadrant (lower left) if both x and y are negative ,fourth quadrant (lower right) if x is positive and y is negative

Write a program that asks the user for values of x and y, and displays

the point as an ordered pair along with a message that describes

where that point falls on the graph.

above, below or on the x-axis

to the left, right or on the y-axis

quadrant number, written using Roman numerals or if the point is at the origin (0,0). Do not display a quadrant or message if the point lies on a single axis, (3, 0).

Example Output:

Enter x: 3.4

Enter y: -8.2

Point: (3.4, -8.2)

The point is below the x-axis.

The point is to the right of the y-axis.

The point lies in quadrant IV.

Instructions:

1. Develop an algorithm (using a flowchart) that describes how your program works.

2. Write a Java program using your algorithm. You may use your own style, but make sure you are consistent through the whole program. Write efficient, maintainable and readable code, (ie. blank lines, indentation, comments…). Remember to use line comments and block comments to document blocks of code and variables.

3. Correct all syntax errors and check your output.

4. Save your program in a file called Graph.java

Request for Solution File

Ask an Expert for Answer!!
Other Subject: Consider a typical two-dimensional graph from mathematics
Reference No:- TGS0590782

Expected delivery within 24 Hours