-
Notifications
You must be signed in to change notification settings - Fork 31.7k
-
Write Java program called QuadraticEquation which computes two x values of a quadratic equation expressed as ax?+bx+c=0, using general formula method, assuming that b2 ≥ 4ac. The program should contain three instance variables a, b, and C, all of type double, for coefficients a, b and c, respectively. These coefficients must be supplied to the program by the user via the keyboard, and get initialized by an appropriate user-defined constructor at the time of creating an object. The program should also contain two instance methods, both returning double values, called computeFirstX and computeSecondX for computing the two x values.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 3 comments
-
hello! please check out the contributing guidelines below so you can add this project to the repo. Maybe enhance it so it not only solves the quadratic equation but also visualizes it/ visualizes the roots. a simple quadratic equation program is not considered a project under the current guidelines so you would have to delve deeper.
Contribution guidelines
Before making a pull request, please make sure of the following:
- The tutorial(s) you want to add do not already exist
- Your tutorial is correctly placed under the appropriate language/technology
- Improvements of the same tutorial are encouraged!
- The pull request needs to have a descriptive title
- If the language/technology of your tutorial does not exist, feel free to create a new entry in table of contents
- Make a separate pull request for each of the tutorial
- Use the following format
[Title](link_to_tutorial)
- If your tutorial is a multi-part series, use the following format:
* Title * [Part 1](link_to_part_1) * [Part 2](link_to_part_2)
- Check the spelling and grammar
- Do the work, write good commit messages, and read the CONTRIBUTING file if there is one
- Remove any trailing whitespaces
- Links must be pointing straight to the tutorials, no URL shorteners. However, if the URL is too long (more than 80 characters), Google URL Shortener is allowed
Thank you for your suggestions! If you think there is anything to improve with the guidelines, please contact me at tuvtran97@gmail.com
Beta Was this translation helpful? Give feedback.
All reactions
-
* Title
* [Part 1](link_to_part_1)
* [Part 2](link_to_part_2)
Beta Was this translation helpful? Give feedback.
All reactions
-
* Title
* [Part 1](link_to_part_1)
* [Part 2](link_to_part_2)
Beta Was this translation helpful? Give feedback.