Question

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) {

 

Expert Solution

Want to see the full answer?

Check out a sample Q&A here
Blurred answer
Students who’ve seen this question also like:
C++ Programming: From Problem Analysis to Program Design
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN: 9781337102087
Author: D. S. Malik
Publisher: Cengage Learning
Not helpful? See similar books
marketing sidebar icon
Want to see this answer and more?
Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*
*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.

Related Computer Science Q&A

Find answers to questions asked by students like you.

Q: I have this project where I create a program that calculates the area of a rectangular prism. I am…

A: Create a JAVA class Prismarea which contains a method calcArea() and instance variable “a” to store…

Q: Question 1 : (Solve quadratic equations) The two roots of a quadratic equation ax² + bx + c = 0 can…

A: Algortihm: 1.import java.util.Scanner 2.create a class called main 3.create a main method  4.check…

Q: Suppose that the city of Sochi can be described as a 2D matrix. Each cell may or may not contain a…

A: Given we have to develop a python code to print the minimum number of baskets that will be required…

Q: Create a PYTHON PROGRAM that will approximate the roots of an equation (i.e. solution to the…

A: According to the Question below the Solution:   Output:

Q: Iam stuck trying to create a program in PYTHON that calculates the coins needed to make change for a…

A: According to the Question below the Solution:   Output:

Q: Create a python program that would perform the given description below Your task is to write a…

A: Start Declare required variables. Draw board, using function. Function to check the position is…

Q: Suppose your friend Thomas goes on a business meeting with Elon Musk. He knows that Elon Musk loves…

A: Introduction: Given the problem statement, we have to develop a python code to find out the amount…

Q: In Python, using import sys Create a program, quadratic.py, that takes in three arguments that…

A: Hey there, I am writing the required solution based on the above given question. Please do find the…

Q: Write python programs to solve below problems in Jupyter note book, Then downle the programs as…

A: Click to see the answer

Q: Suppose your friend Thomas goes on a business meeting with Elon Musk. He knows that Elon Musk loves…

A: Given the problem statement, we have to develop a python code to find out the amount of time that…

Q: Suppose your friend Thomas goes on a business meeting with Elon Musk. He knows that Elon Musk loves…

A: Introduction: Given the problem statement, we have to develop a python code to find out the amount…

Q: Suppose your friend Thomas goes on a business meeting with Elon Musk. He knows that Elon Musk loves…

A: Given in the problem statement that we have to develop a python code to find out the amount of time…

Q: Suppose your friend Thomas goes on a business meeting with Elon Musk. He knows that Elon Musk loves…

A: Algorithm: Firstly take the input form the user regarding test cases. Then take the value from the…

Q: Suppose your friend Thomas goes on a business meeting with Elon Musk. He knows that Elon Musk loves…

A: Given in the problem statement that we have to develop a python code to find out the amount of time…

Q: Suppose your friend Thomas goes on a business meeting with Elon Musk. He knows that Elon Musk loves…

A: In the above problem, the concept is that Elon musk only gives the time to those boxes who are the…

Q: Suppose your friend Thomas goes on a business meeting with Elon Musk. He knows that Elon Musk loves…

A: We are given Numbers from X to N  where X<=N. It is also said that Elon is fascinated with…

Q: Suppose your friend Thomas goes on a business meeting with Elon Musk. He knows that Elon Musk loves…

A: In this problem, we need to write a Python program to solve the problem. Algorithm -   In this…

Q: Suppose your friend Thomas goes on a business meeting with Elon Musk. He knows that Elon Musk loves…

A: Given in the problem statement that we have to develop a python code to find out the amount of time…

Q: Suppose your friend Thomas goes on a business meeting with Elon Musk. He knows that Elon Musk loves…

A: Introduction: Given the problem statement, we have to develop a python code to find out the amount…

Q: Suppose your friend Thomas goes on a business meeting with Elon Musk. He knows that Elon Musk loves…

A: Given in the problem statement that we have to develop a python code to find out the amount of time…

Q: Suppose your friend Thomas goes on a business meeting with Elon Musk. He knows that Elon Musk loves…

A: Introduction: Given the problem statement, we have to develop a python code to find out the amount…

Q: Suppose your friend Thomas goes on a business meeting with Elon Musk. He knows that Elon Musk loves…

A: In the above-given problem, we need to design a Python program to solve and crack the logic.  In…

Q: Suppose your friend Thomas goes on a business meeting with Elon Musk. He knows that Elon Musk loves…

A: Introduction: Given in the problem statement that we have to develop a python code to find out the…

Q: Suppose your friend Thomas goes on a business meeting with Elon Musk. He knows that Elon Musk loves…

A: Start. Declare the variable. Perform the calculations. Print the results. Exit.

Q: Suppose your friend Thomas goes on a business meeting with Elon Musk. He knows that Elon Musk loves…

A: Introduction: Given the problem statement, we have to develop a python code to find out the amount…

Q: Suppose your friend Thomas goes on a business meeting with Elon Musk. He knows that Elon Musk loves…

A: Ans:) OTE: As no programming language is mentioned I am using python to code this.   In this…

Q: Suppose your friend Thomas goes on a business meeting with Elon Musk. He knows that Elon Musk loves…

A: In this problem, we need to write a python program to solve the problem. Algorithm -   In this…

Q: Suppose your friend Thomas goes on a business meeting with Elon Musk. He knows that Elon Musk loves…

A: Given in the problem statement that we have to develop a python code to find out the amount of time…

Q: Suppose your friend Thomas goes on a business meeting with Elon Musk. He knows that Elon Musk loves…

A: Given in the problem statement that we have to develop a python code to find out the amount of time…

Q: Suppose your friend Thomas goes on a business meeting with Elon Musk. He knows that Elon Musk loves…

A: Algorithm: Firstly take the input form the user regarding test cases. Then take the value from the…

Q: Instruction: Using the sequence programming concept, create a java program that will read three…

A: import java.util.*;import java.lang.*;import java.io.*; class Codechef{ public static void main…

Q: Warning!!! this was answered already but the solutions is incorrect so i reposted it please give me…

A: Here I have taken input from the user and then stored it into a  variable. Next, I have used a while…

Q: Q} Solve the below programming problem using Python Charle, the Ben Prankster is back in action now…

A: The Journey ben and his friends can be described as follows. There is a total of B dishes on the…

Q: Q} Solve the below programming problem using Python Charle, the Ben Prankster is back in action now…

A: Here is the detailed and simplified python code for the given question:

Q: Q} Solve the below programming problem using Python Charle, the Ben Prankster is back in action now…

A: The Journey ben and his friends can be described as follows. There is a total of B dishes on the…

Q: Q} Solve the below programming problem using Python Charle, the Ben Prankster is back in action now…

A: Here is the detailed and simplified python code for the given question:

Q: Q} Solve the below programming problem using Python Charle, the Ben Prankster is back in action now…

A: Given:

Q: Q} Solve the below programming problem using Python Charle, the Ben Prankster is back in action now…

A: The Journey Ben and his friends can be described as follows. There is a total of B dishes on the…

Q: Q} Solve the below programming problem using Python Charle, the Ben Prankster is back in action now…

A: We have to give the minimum length of the unused wire, or -1 if the the wire is not sufficient.…

Q: Q} Solve the below programming problem using Python Charle, the Ben Prankster is back in action now…

A: The Journey ben and his friends can be described as follows. There is a total of B dishes on the…

Q: Q} Solve the below programming problem using Python Charle, the Ben Prankster is back in action now…

A: Given:

Q: Hello, I am using the Intro to Java programmming and data structures by Y. Daniel Liang. Our…

A: A java program to check the user’s input is a factor of random number generated is given…

Q: Science QuestionEinstein is a bright mathematician. Today he is investigating whether an integer is…

A: Required:   Einstein is a bright mathematician. Today he is investigating whether an integer is…

Q: n Python: Sites like Zillow get input about house prices from a database and provide nice summaries…

A: INPUT/OUTPUT:

Q: We want to write a Python program for n players, which are playing a tournament. In this competition…

A: Required:

Q: We want to write a Python program for n players, which are playing a tournament. In this competition…

A: Required:

Q: powers of the variable. The Maclaurin series expansion for sin(x) is given by the following formula…

A: import java.util.Scanner; public class Introduction{     //Factorial function to find factorial of…

Q: i  am in an intro to programming class and we are learning the language python:  def…

A: Collatz sequence is defined below-1)If n is even, then n=n/22)If n is odd, then n=(3*n)+13)Repeat…

Q: Convert the following mathematical notation into programming notation, assume that you have already…

A: Arithmetic operations in python are done using the operators +,-,*,/ for addition, subtraction,…

Q: I needed  some help with this java homework assignement. We use eclipse.     CIS365 Hw1: Count…

A: Import the required packages like Scanner, Map, and HashMap. Declare the line and len variable for…

Knowledge Booster
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • I have this project where I create a program that calculates the area of a rectangular prism. I am suppose to print the results in printf this is what I have... is it correct?   instructions ; Write a Java program that computes the total surface area of a rectangular prism like the one below. There are six sides, so the area of all sides has to be summed to get total area. Inputs: The program should ask the user to enter the length (L), width (W), and height (H) for the object in inches. So there are three inputs to the program. Create a separate method from main to calculate the area. Name the separate method calcArea and it needs to have three input arguments: length, width, and height. The output of calcArea will return a double. Outputs: The program should have this output (below is an example): The total area for a rectangle prism <L> inches long, <W> inches wide, and <H> inches tall is <A> square inches. Where A is the area your program calculates and…
    I have a python programing question In 1937, a German mathematician named Lothar Collatz formulated an intriguing hypothesis (it still remains unproven) which can be described in the following way: 1. take any non-negative and non-zero integer number and name it c0; 2. if it's even, evaluate a new c0 as c0 ÷ 2; 3. otherwise, if it's odd, evaluate a new c0 as 3 × c0 + 1; 4. if c0 ≠ 1, skip to point 2. The hypothesis says that regardless of the initial value of c0, it will always go to 1. Of course, it's an extremely complex task to use a computer in order to prove the hypothesis for any natural number (it may even need artificial intelligence), but you can use Python to check some individual numbers. Maybe you'll even find the one which would disprove the hypothesis. Write a program which reads one natural number and executes the above steps as long as c0remains different from 1(c0 != 1). Moreover, we'll add another task - we want you to count the steps needed to achieve the goal. Your…
    Using Python  For this assignment, we’re going to build our own song remixing solution. As an example: given the following American children’s song (this is ONE of the 3 songs I’m giving you in the starter code that includes the data you'll use for your program): SONG = ['old macdonald had a farm - ee-i-ee-i-o.',         'and on that farm he had a cow - ee-i-ee-i-o.',         'with a moo moo here and a moo moo there',         'here a moo - there a moo - everywhere a moo moo',         'old macdonald had a farm - ee-i-ee-i-o.' ] Do This: Create a solution that allows users to: Load a new song from our playlist When requested, show the title of the song you’re currently remixing Continue the above operations on demand, until the user explicitly quits your program. Note that there is punctuation in some of the songs we've given you. When you remix a song, you should remove the punctuation (see the example reverse below). If you are unable to perform the remix, do NOT remove any…
  • Hi, Can you change(write) this code a little differrent? and this is the question but pls change this code Write a computer program for Gauss elimination method using C programming language. Decide the number of significant figures yourselves. While writing your program, consider the effects of the number of significant figures, pivoting, scaling and do not forget to check if the system is ill conditioned.   #include<iostream>#include<cmath>using namespace std;int main(){int n,i,j,k;// initializing variablescout<<"\nEnter the no. of equations\n";cin>>n; //input the no. of equationsfloat matrix[n][n+1],x[n]; //declare an array to store the elements of augmented-matrixcout<<"\nEnter the elements of the augmented-matrix row-wise:\n";for (i=0;i<n;i++)// taking the input from the userfor (j=0;j<=n;j++)cin>>matrix[i][j];//input the elements of arrayfor (i=0;i<n;i++) //Pivotisation for the given matrixfor (k=i+1;k<n;k++)if…
    java What will be the result if we use the division operator in the following way: a / bSelect one or more options: a.always a floating point number b.always an integer c.a floating point number equal to a division of a with b if a and b are floating point numbers. d.a floating point number equal to a division of a with b if one of the numbers a and b is a floating point number and the others are an integer. e.an integer equal to an integer division of a and b if a and b are integers.
    PYTHON PROGRAMING : Code must only be in python.  A tic-tac-toe grid of size n is a grid composed of empty tiles bounded by solid lines. The grid is composed of n tiles in width and n tiles in height. Tic-tac-toe is usually played on a grid of size 3. We want to write a program to display on the console a tic-tac-toe grid of size n. Each tile has a certain width in number of characters (for example 6) and a certain height in number of lines (for example 3). Here is the expected output of the program for n = 3:                #            #             #            #             #            #####################             #            #             #            #             #            #####################             #            #             #            #             #            # You need to display a tic-tac-toe grid of size n = 3 that respects this exact display format, with tiles of size 6 x 3. It should be easy to modify your program to change n, the width and height of…
  • PYTHON PROGRAMING : Code must only be in python.  A tic-tac-toe grid of size n is a grid composed of empty tiles bounded by solid lines. The grid is composed of n tiles in width and n tiles in height. Tic-tac-toe is usually played on a grid of size 3. We want to write a program to display on the console a tic-tac-toe grid of size n. Each tile has a certain width in number of characters (for example 6) and a certain height in number of lines (for example 3). Here is the expected output of the program for n = 3:                #            #             #            #             #            #####################             #            #             #            #             #            #####################             #            #             #            #             #            # You need to display a tic-tac-toe grid of size n = 3 that respects this exact display format, with tiles of size 6 x 3. It should be easy to modify your program to change n, the width and height of…
    Write a program that creates a table for the user's choice of basic math operations (+, -, *, /, and %). These operations will all be performed in an integer-only way. (Modulo doesn't work with decimals anyway... And you're going to have enough trouble lining up the table without dealing with decimal places on division!) The user should also be allowed to choose the size of the table (it will, of course, be square: 4x4, 5x5, etc.). You may limit the maximum size of the table, for formatting purposes. Make sure your table is neat and lines up nicely (see the examples below). Columns should all be of equal width. This should be the minimum width necessary to hold the largestanswer for the table's operation. (Be careful! This may be a negative value!) Note that, if each column is as small as possible, you can fit more of them on the screen... Try to use functions to break up the program into more manageable -- re-usable -- pieces. (You'll note that most of the table display is identical…
    For the three poiats 4 (Xa, Ya), B (Xb, ¥5) and C (Xe, ¥e) the cquation of the line L parallel to the segment AB and passing by the point C is given by: ¥ = mX + k where: va m is the slope and computed as = m = [ ke is the intercept and computed as : k = Ye — m. Xc Write & java program that calculate and display the slope, the intercept and the equation of the Line parallel to AB and passing by C for the given values: A (1.5,2), B (2.5, -4)and C (-1.5, 105) ‘Your program should output exactly the following: Sample Run The slope is -6.0 “The interceptis 1.5 “The equation of the parallel is ¥ =-6.0 X+ 1.5
  • Create a PYTHON PROGRAM that will approximate the roots of an equation (i.e. solution to the equation f(x) = 0) using Newton's Method. Newton's Method is an iterative process that approximates the solution using the equation:   For this activity, you will approximate the solution for f(x) = x^2. (The derivative of this function is f'(x) = 2x). Your program should accept two user inputs: the number of iterations to perform, n (integer) the starting guess , x0 (float) then output the resulting values of x for each iteration (including the starting guess). For example, if the user wants to perform 3 iterations with a starting guess of x0=1, the result should look like: x 0 = 1.0 x 1 = 0.5 x 2 = 0.25 x 3 = 0.125   Note: The results of this problem have varying numbers of decimal places. Therefore, your print statement should either: (a) use commas to separate strings and variables OR (b) use variable replacement fields with the format() function. If you use replacement fields, we…
    How do I solve this problem in java programming language?   After all loan information is input, the program should output the loans in the following format: Sanchez Construction Loan #1 Name: Joe $10000.0 for 5 year(s) at 9% interest Loan #2 Name: Sara $5000.0 for 3 year(s) at 10% interest Loan #3 Name: Mike $975.0 for 1 year(s) at 10% interest Loan #4 Name: Jane $7000.0 for 5 year(s) at 9% interest Loan #5 Name: Peter $300.0 for 1 year(s) at 9% interest
    Please answer it in Python Suppose we play a game where each round takes place in the following way: first, we roll a dice, and its result gives the number of points at stake. Then, the player can, if he wishes, trigger his bonus "double account" or his bonus "triple account". Then, the player answers a number of questions, and calculates his percentage of correct answers. The points awarded to the player for that round are then calculated based on the percentage of correct answers and the number of points in play rounded to the nearest integer (for example, with 50% correct answers and 6 points in play, the player gets 3 points; with 45% correct answers and 8 points in play,  the player gets 4 points). Finally, this number of points is possibly multiplied by two or three if the corresponding bonus has been used. Write a function points_match that takes as an argument the percentage, the number of points at stake, and as an optional argument the multiplier (which is worth 2 in a double…
    • SEE MORE QUESTIONS
    Recommended textbooks for you
  • C++ Programming: From Problem Analysis to Program...
    Computer Science
    ISBN:9781337102087
    Author:D. S. Malik
    Publisher:Cengage Learning
  • C++ Programming: From Problem Analysis to Program...
    Computer Science
    ISBN:9781337102087
    Author:D. S. Malik
    Publisher:Cengage Learning