1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
kramer
3 years ago
8

Given that a method receives three parameters a, b, c, of type double, write some code, to be included as part of the method, th

at checks to see if the value of a is 0; if it is, the code prints the message "no solution for a=0" and returns from the method.
Computers and Technology
1 answer:
Vikentia [17]3 years ago
7 0

Answer:

The code to this question can be given as:

code:

if(a == 0)  //check condition (a is equal to 0 )  

{

System.out.print("no solution for a=0");

}

Explanation:

As we know that a method is already given. That takes three parameters from the user and its data type is double. In this, we will check that if the value of a is equal to 0 then it will print no solution for a. To check this condition we used the if block because this block executes true condition only. The syntax for if block can be given as:

Syntax:

if(condition)

{

//code to be executed.

}

In the above syntax if we will pass the value that is given in the code part. So it will give the correct output.    

You might be interested in
A ____ attack seeks to deny legitimate users access to services by either tying up a server's available resources or causing it
padilas [110]
I believe the answer is cyber attack.
3 0
4 years ago
. Complete the code, drawing a line between points (100, 200) and (34, 67)
Galina-37 [17]

Answer:

The answer for the given question is given below:

public void paint( Graphics g )

{

g.drawLine(100, 200 ,34, 67);

}

Explanation:

In this code we are using “drawLine” method to draw the line between the points

The graphics object “g” is to call the drawLine method .

The syntax of drawline method is given below

drawLine(int X1, int Y1, int X2, int Y2)

Where  X1,  Y1,  X2,  Y2 are the points in the x and y coordinate

Following are the full code of that program  

import java.applet.Applet; // package of applet

import java.awt.Graphics; // package of awt  

public class line1 extends Applet  //inherit applet class

{

public void paint( Graphics g ) // paint method

{

g.drawLine(100, 200 ,34, 67); // drawline

}

}

It draw the corresponding line between the coordinate

8 0
3 years ago
Circuit pruning occurs only before puberty.<br> O True<br> O False
jok3333 [9.3K]

Answer:

False

Explanation:

7 0
3 years ago
Read 2 more answers
The act of deliberately accessing computer systems and networks without authorization is generally known as _____.
Anuta_ua [19.1K]

it is known as hacking

3 0
3 years ago
What will be the value of ans after the following code has been executed?
Lesechka [4]

Answer:

Option B 120

Explanation:

There are three variables,<em> ans, x </em>and <em>y</em> given in the code. In beginning, the variable. <em>ans,</em> holds value of 10.  And variable <em>x</em> and <em>y</em> hold value of 65 and 55, respectively. Since the value held by x is bigger than one held by y, the if condition is met and the statement ans = x + y will run. The execution of this statement will total x with y -> 65 + 55 and the initial value of <em>ans is </em>overwritten by the addition result which is 120.

7 0
3 years ago
Read 2 more answers
Other questions:
  • When you use a while loop to compute the product of several values, you should initialize the variables holding the product to _
    15·1 answer
  • What do we call the distribution and access of illegal copies of digital books??
    10·1 answer
  • One factor affecting digital camera quality is the number of pixels, measured in ____, used to store the data for each image.
    8·2 answers
  • Write a function that accepts a list as an argument (assume the list contains integers) and returns the total of the values in t
    10·1 answer
  • Write a single if-test using Boolean operators and relaional operators to determine if a double variable x is between zero (excl
    11·1 answer
  • The combined resistance of three resistors in parallel is: Rt = 1 / ( 1 / r 1 + 1 / r 2 + 1 / r 3 ) Create a variable for each o
    15·1 answer
  • Write a class named Book that has fields to hold the following data: Title Author Year published ISBN number In the Book class,
    9·1 answer
  • Return a version of the given string, where for every star (*) in the string the star and the chars immediately to its left and
    11·1 answer
  • True or false. The CPU requires it's own power from the power supply, and can't receive power from the motherboard.
    9·1 answer
  • Relieved to have survived ,henry rolled off the rink________.giving alex a grateful look
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!