Convert the following UML class diagram into a complete, wor…
Convert the following UML class diagram into a complete, working Java class named QuadraticEquation: Requirements: Implement the class exactly as shown in the UML diagram. All data fields must be private. Provide a constructor that accepts the three coefficients a, b, and c. Implement the three methods shown: getDiscriminant(), getRoot1(), and getRoot2(). You may assume the discriminant is greater than or equal to zero (i.e., the equation has real roots). Use the quadratic formula to calculate the roots inside getRoot1() and getRoot2(). The formula for the discriminant is: discriminant = b² − 4ac The formulas for the roots are: root1 = (−b + √discriminant) / (2a) root2 = (−b − √discriminant) / (2a) Hint: Remember to use Math.sqrt() to calculate the square root. Hint: The quadratic equation formula is used to find the solutions (or roots) of a quadratic equation, which is typically expressed in the standard form: ax2+bx+c = 0 where a, b, and c are constants, and a
Read DetailsConsider the photoelectric effect experiment below, where th…
Consider the photoelectric effect experiment below, where the plate on the left is being stimulated by photons, and the plate on the right is at a positive voltage. Answer the questions below on your show your work sheet. No answer in canvas is required for full marks, so long as the work on your show your work sheet is correct. a) Draw the direction of the electric field that will exist between the plates. b) Assuming the energy of the photons is greater than the work function, should a positive voltage or negative voltage be applied to the right hand plate in order to block current flow? c) If the energy of the photons is [Eph] eV and the work function of the material is [wf] eV, what magnitude of voltage must be applied to JUST block the current?
Read Details