Skip to content

HelloWorld for Java 11, version 1.00.02-delta(rc)-Hola

Latest
Compare
Choose a tag to compare
@RayArias RayArias released this 04 Sep 06:20
· 3 commits to master since this release
c4543d6

(Semantic version 1.0.2-rc-Java)

Screenshot_20220903-192410_JStudio

HelloWorld for Java, including subpackages TextUI, version 1.01.01-delta(rc)-Model T and QuadraticFormula, version 1.00.01-delta(rc)-Thales of Miletis. Has iteration test (simple for loop counting from 0 to 9) and recursion test (simple method that passes n - 1 to itself until n == 0). After this, it asks the user for coefficient to a quadratic equation (a must not be 0, or it will display a message and ask again), then computes the solutions using the quadratic formula. There are 3 possibilities: 2 real solutions that are different, 2 real solutions that are identical, or two complex solutions that are conjugates of one another. These solutions are displayed and the program ends.

The previous version had an error where it was comparing b to the square root of 4ac, whereas it should have been comparing the absolute value of b, abs(b), to sqrt(4ac). This algorithm is basically a variant of calculating the discriminant, b² - 4ac, and comparing it to 0 to determine the types of solutions that will come out of the quadratic formula. The error has been corrected.