Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The general form of the equation of a straight line can be expressed as Ax + By +C =0 with a condition that A and

image text in transcribed

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==(4x+C). 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: B -1 0 1 2 y = 2x + 1 y = 2 * (-1) + 1 = -1 y = 2 x 0 + 1 = 1 y = 2 x 1 + 1 = 3 y= 2 2 + 1 = 5 Point (-1,-1) (0,1) (1,3) (2,5) Instruction: 1. Use Notepad to create new text file named EX03_1.java. Enter the following two lines (be sure to replace YourFullName with your full name): 96 Java Programming - Penniel P. Wu, PhD // FileName: EX03_1.java // Programmer: YourFullName 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. Make sure the output looks similar to the following.. [Note: Be sure to use input an output dialog boxes, otherwise, you might receive zero.] Input x Input x Input ? Enter A: ? Enter B: ? Enter C: 5 OK Cancel OK Cancel OK Cancel and Message Equation 3x+4y+5-0 Includes two points: (1.0,-1.25) (2.0, -20) OK

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

2nd Edition

1597499471, 978-1597499477

More Books

Students also viewed these Databases questions

Question

=+2 How can the effectiveness of global virtual teams be improved?

Answered: 1 week ago

Question

=+1 What are the major issues related to international T&D?

Answered: 1 week ago