Question: Create a java program that will take inputs of A, B, and C as integers from users. Reject the inputs if both A and B

The general form of the equation of a straight line can be expressed as Ax+By+C =0 with a condition that A and B cannot both be zero. This equation can also be expressed as: y . Given a straight line, 2x -y + 1 = 0, one can re-write the equation as y=2x+1 and then use it to find few points that are on the line. Here are some example values: y = 2x + 1 y = 2 x (-1) + 1 = -1 y = 2 x 0 + 1 = 1 y = 2 x 1+1=3 y = 2 x 2 + 1 = 5 Point (-1.-1) (0, 1) (1,3) (2.5) Instruction: 1. Use Notepad to create new text file named "MyProg03.java". Enter the following two lines (be sure to replace YourFullName with your full name) // FileName: My Prog03.java // Programmer: Your FullName Java Programming - Penniel P. Wu, PhD Create a Java program that will take inputs of A, B and C (as integers) from users. Reject the inputs if both A and B are zeros; otherwise, find two points on the line and display them in the form of (x,y). 3. A sample output looks: ? Enter Enter Enter Di Enter 2. Create a Java program that will take inputs of A, B and C (as integers) from users. Reject the inputs if both A and B are zeros, otherwise, find two points on the line and display them in the form of (x, y). 3. A sample output looks: Input Enter : Enter cu OK Cancel OK Cancel Cancel und Message Equation 3x+4y+5-includes two points (1.0, -1.25) (2.0,-2.0) OK |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
