Question

quadratic equation by PHP The purpose of this question is to develop a simple calculator for...

quadratic equation by PHP

The purpose of this question is to develop a simple calculator for solving a quadratic equation of the form . The solution of the quadratic equation can be classified as a real or an imaginary solution. In this question you are required to apply two formulas for solving the quadratic equation; the discriminant formula and quadratic formula. The discriminant formula is applied for determining whether the quadratic equation has a real or imaginary solution, where the quadratic formula is applied for finding the real solution(s) of the quadratic equation. If the quadratic equation has a real solution, the calculator should find that real solution(s) by applying the quadratic formula. But if the quadratic equation has an imaginary solution, the calculator should notify only that there is an imaginary solution without finding that solution. In this question you might need to make a quick revision through the internet to remember how to solve the quadratic equation by using discriminant and quadratic formulas. The quadratic calculator should be implemented by using HTML tags and PHP codes. The final code with 2 snapshots should be provided in your answer sheet. The calculator software system starts by browsing the calculator web page with:

1- A suitable title.

2- A suitable header.

3- Three empty textboxes with suitable labels for holding the three coefficients A, B and C of the quadratic equation.

4- An empty textbox with suitable label for holding the real solution(s) or holding a notification for the imaginary solution.

5- Two buttons with suitable labels, one for solving the quadratic equation and the other for clearing all values displayed in the coefficients textboxes and the solution textbox. Note:

The design and the layout of the calculator’s web page are left intentionally for the student to show his/her creativity in this part. The PHP part of the calculator software system should include two functions as described below:

1- A PHP function for testing whether the quadratic equation has a real or an imaginary solution.

2- A PHP function for finding the real solution(s) of the quadratic equation. The calculator software system should satisfy the following requirements:

1- The numerical values of the coefficients A, B and C of the quadratic equation may be any numerical value except zero.

2- The solution(s) of the quadratic equation should be shown only in the solution textbox when all coefficients textboxes are filled with numerical values and after pressing on the button that allocated for starting the solving process. Otherwise a suitable message should be shown in the solution textbox to notify that at least one of the coefficients text boxes is filled with none numerical value.

3- A suitable message should be shown in the solution textbox when the quadratic equation has an imaginary solution.

4- The solution of the quadratic equation should be rounded to 3 decimal places.

5- The solution of other quadratic equations can be calculated by changing only the coefficients’ values in the textboxes and pressing on the button that allocated for starting the solving process.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

quadratic equation by PHP :

Add a comment
Know the answer?
Add Answer to:
quadratic equation by PHP The purpose of this question is to develop a simple calculator for...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Visual Basic You are asked to develop a Visual Basic Net application that can determine roots...

    Visual Basic You are asked to develop a Visual Basic Net application that can determine roots of a requirements of this project are as follows: 1) Design a form to allow users to define a quadratic equation and to find the roots of the equation. The form should have a label that shows this message: Solving a quadratic equation ax2+bx+c=0 The form should have three textboxes in which users enter the values of a, b, and c The form should...

  • please answer this question with python. Write a program to solve the quadratic equation ax^2 +...

    please answer this question with python. Write a program to solve the quadratic equation ax^2 + bx + c = 0 using the standard quadratic formula x = -b plusminus Squareroot b^2 - 4ac/2a or the alternative formula x = 2c/-b Squareroot b^2 - 4ac. Your program should accept values for the coefficients a, b, and c as input and produce the two roots of the equation as output. Your program should detect when the roots are imaginary, but need...

  • A quadratic equation is generally represented as, ax^2 + bx + c The root(s) of the...

    A quadratic equation is generally represented as, ax^2 + bx + c The root(s) of the above quadratic equation is computed using the following formula, root1 = (-b + sqrt(D))/ 2a root2 = (-b - sqrt(D))/2a Where D is the discriminant of the quadratic equation and is computed as, D = b^2 - 4ac Given the value of D, the roots of a quadratic equation can be categorized as follows, D > 0 : Two distinct real roots D =...

  • Java Programming Question. I am writing a code to calculate the roots of the quadratic equation...

    Java Programming Question. I am writing a code to calculate the roots of the quadratic equation based on the values of the coefficients A, B, and C. I am supposed to enter 5 values for each coefficient, and the output should be five different answers (see example) using a for loop and if else statements. However, when I run my code, I am only able to enter one value for each coefficient and the output is one answer repeated five...

  • Question 1 of 8, Step 2 of 2 1/12 Correct Consider the following quadratic equation: y2...

    Question 1 of 8, Step 2 of 2 1/12 Correct Consider the following quadratic equation: y2 - 8y + 1 = 0 Step 2 of 2: Use the discriminant, b2 - 4ac, to determine the number of solutions of the given quadratic equation. Then solve the quadratic equation using the -b + b2 - 4ac formula y = 2a Answer Keypad Select the number and type of solutions. Then, enter the solutions. Previous Step Answer Selecting an option will display...

  • CODE MUST BE IN C++ Objective Create a program that provides the solution to a quadratic...

    CODE MUST BE IN C++ Objective Create a program that provides the solution to a quadratic equation. Background: A quadratic equation can be generalized by equation below: f ( x )=ax2+ bx +c Closed form solutions can be found for the zeros of a quadratic function conveniently. That is the locations where the function is equal to zero can be found by the following equation: x=− b± √ b −4ac 2a Note that depending on the sign of the expression...

  • DQuestion 19 28 pts Problem 2. Quadratic Equations A quadratic equation has the form: a bc0 The two solutions are given by the formula: 2a Write a program with a loop that a) solves quadratic equatio...

    DQuestion 19 28 pts Problem 2. Quadratic Equations A quadratic equation has the form: a bc0 The two solutions are given by the formula: 2a Write a program with a loop that a) solves quadratic equations with coefficients read from the terminal, b) visualizes the corresponding quadratic function az2 brc0using the matplotlib module. Instructions Write all code for this problem in a file p2.py 1. The program consists of a main whtle loop (an infinite loop) in which the user...

  • Task 3 - Simpson's Rule (Maximum Mark 15) Find the equation the quadratic y = ax?...

    Task 3 - Simpson's Rule (Maximum Mark 15) Find the equation the quadratic y = ax? + bx + c which passes through the points AC-h, Y.), B(0,y), and C(h.yc). Use your quadratic to find an expression for the area under the quadratic between the points A and C. Explaining carefully how your result can be used to prove the general formula for Simpson's Rule. Notes: . You will need to research independently to find the formula for Simpson's Rule....

  • HICULTUULUULULUI 2 Task 2 - Trapezium Rule (Maximum Mark 10) Find the equation of the line...

    HICULTUULUULULUI 2 Task 2 - Trapezium Rule (Maximum Mark 10) Find the equation of the line through the points 1 - ...) a | and B(x) and find an expression for the area under this line between the points A and B. Explain carefully how your result can be used to prove the general formula for the Trapezium Rule. Notes: . This part of the assignment is testing that you can find the equation of a line and use this...

  • Task 2 - Trapezium Rule (Maximum Mark 10) Find the equation of the line through the...

    Task 2 - Trapezium Rule (Maximum Mark 10) Find the equation of the line through the points A(Y) and (.ya) and find an expression for the area under this line between the points A and B. Explain carefully how your result can be used to prove the general formula for the Trapezium Rule. Notes: • This part of the assignment is testing that you can find the equation of a line and use this to derive other formulae. Marking Criteria...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT