This is another Computer Science Question and I need to figure out how write a program that will solve this answer and Its required that I use Java to answer this quesion I used Eclipse but Im struggling to run this programThe formula for computing the discriminant of a quadratic equation ax^2 + bx + c = 0 is b^2 – 4ac. Write a program that computes the discriminant for the equation 3x^2 + 4x + 5 = 0.Class Name: Exercise01_01Extrapublic class Exercise01_01Extrapublic static void main(String[] args) {

Question
Asked Jan 25, 2020
9 views

This is another Computer Science Question and I need to figure out how write a program that will solve this answer and Its required that I use Java to answer this quesion I used Eclipse but Im struggling to run this program

The formula for computing the discriminant of a quadratic equation ax^2 + bx + c = 0 is b^2 – 4ac. Write a program that computes the discriminant for the equation 3x^2 + 4x + 5 = 0.

Class Name: Exercise01_01Extra

public class Exercise01_01Extra

public static void main(String[] args) {

 

check_circle

Expert Answer

Step 1

A Java program to compute the discriminant of a given quadratic equation is as follows,

File name: “Exercise01_01Extra.java”

//Import required package

import java.util.Scanner;

 

//Create a class

public class Exercise01_01Extra

{

    //Define the method

    public static void main(String[] args) {

       

        //Create Scanner object

        Scanner inp = new Scanner(System.in);

 

        //Prompt the user to enter the values for a, b and c

        System.out.print("Enter the values for a, b, and c: ");

       

  &...

Computer Science homework question answer, step 1, image 1
fullscreen

Want to see the full answer?

See Solution

Check out a sample Q&A here.

Want to see this answer and more?

Solutions are written by subject experts who are available 24/7. Questions are typically answered within 1 hour.*

See Solution
*Response times may vary by subject and question.

Related Computer Science Q&A

Find answers to questions asked by student like you
Show more Q&A
add
question_answer

Q: Method: sumOdds(value: int): This method will sum all the odd values from 1 upto the value passed by...

A: A Python code for the given methods is as follows,File name: “main.py”import randomdef sumOdds(value...

question_answer

Q: What is an example of a query that is based on the tables (attached)  and includes both an arithmeti...

A: Query:SELECT COURSE.COURSE_TITLE, COURSE.COURSE_DESCRIPTION, COURSE.COURSE_TYPE_CODE FROM COURSE INN...

question_answer

Q: What are strings in c++?

A: String in C++:String is a class found in the library of C++. String object is used to store the stri...

question_answer

Q: What type of key is used in symmetric cryptography, must be known by both parties, and is used for b...

A: Symmetric cryptography (Symmetric-key encryption):It is an encryption technique in which a single ke...

question_answer

Q: What are the tasks of system maintenance?

A: Answer:System maintenance tasks:Deleting from the builds list – the Cluster Manager build history is...

question_answer

Q: Unlike third generation networks (3G), fourth generation networks (4G) carry voice and data together...

A: Spectral efficiency of cellular networks:Spectral efficiency is also known as bandwidth efficiency, ...

question_answer

Q: analyze each program and figure out what is wrong with the memory management in the code and how to ...

A: In this program malloc() function is used to allocate memory.malloc() syntax:pointer= (cast-type*) m...

question_answer

Q: If you were an IT Director, would you recommend SDN? Why or why not?

A: Software Defined Networking (SDN):The Software Defined Networking (SDN) is basically a new technolog...

question_answer

Q: Create a complex query based on two or more tables (SCHOOL, DEPARTMENT, PROFESSOR, TECHNOLOGY, COURS...

A: CREATE TABLE:Use the statement CREATE TABLE to create a new SQL table.Syntax:CREATE TABLE { table-na...