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
Ronch [10]
2 years ago
11

Write a function template that accepts an argument and returns its absolute value. The absolute value of a number is its value w

ith no sign. For example, the absolute value of -5 is 5, and the absolute value of 2 is 2. Test the template in a simple driver program being sure to send the template short, int, double, float, and long data values.
Computers and Technology
1 answer:
svetlana [45]2 years ago
8 0

Answer:

The function in Java is as follows:

public static double func(double num){

       num = Math.abs(num);

       return num;

   }

Explanation:

This defines the function

public static double func(double num){

This determines the absolute function of num

       num = Math.abs(num);

This returns the calculated absolute value

       return num;

   }

You might be interested in
Assume you have written a method with the header num mymethod(string name, string code). the method's type is
azamat
I need answer choices
5 0
3 years ago
Write a program that outputs "Hello World!".
tekilochka [14]
Print(“Hello World!”)

I hope this helps :) I’m sry is this what you wanted or were you looking for something else because I’m willing to help either way.
4 0
2 years ago
This is not a factor that you should use to determine the content of your presentation. Your audience your goals your purpose yo
aksik [14]

Your technology I believe

4 0
3 years ago
Read 2 more answers
Project 15A - Math Application
vovikov84 [41]

Answer:

A simple php code for the following is given below:

Explanation:

interface Calculate {

 public function area($lenght,$width);

 public function perimeter($length,$width);

 public function surfaceArea($length_side_1,$length_side_2);

 public funcction volume($length, $width, $height):

}

interface Calculate2 {

 public function area($raidus);

 public function perimeter($radius);

 public function surfaceArea($radius);

 public funcction volume($radius):

}

Class Mian{

 

width=please Enter the value of width

height=please Enterr the value of height

length=please enter the value of length

lenght2=please enter the value of lenth of side 2

ridus= please enter the value of radius

    Circle = new circle()

    Rectangle = new rectangle()

}

Class Circle implements Calculate2{

 

public function area(){

area= pi*r

return area

}

public function perimeter(){

perimeter=2*pi*r

return perimeter

}

public function surfaceArea(){

surfacearea= pi*r*r

}

public function volume(){}

          area=area()

   volume=area*height

      return volume

}

Class Rectangle implements Calculate{

 

public function area(lenght,width){

 area= length * width

 return area

}

public function perimeter(lenght,width){

          perimenter=2(lenght+width)

          return perimeter

}

public function surfaceArea(length_side_1, withd right place){}

       surface_area 2*length_side_1  f*  length_side_2_

public function volume(){}

public surface volume(length,width,height)

 volume= length * width * height  

 return volume

}

7 0
3 years ago
Chang investigates ways to improve the interactivity of computer hardware. His job title is best described as ✓ Computer and Inf
xeze [42]

Answer:

B, D, C

Explanation:

got it right

3 0
2 years ago
Other questions:
  • A species of snake lives in a rainforest. Which would be an adaptation for this
    10·2 answers
  • 4. Extrusion tools in Blender® duplicate vertices while keeping the geometry connected with the original vertices. (1 point)
    7·1 answer
  • True/False: When you make a function call, the order of the arguments you send does not matter as long as the number of argument
    15·1 answer
  • 3. A security system uses sensors at every door and window which will set off analarm if any one of them is opened. There is als
    15·1 answer
  • Which of the following is true about advertisements?
    15·1 answer
  • Shelby wants to move “ExpirationDate” to the top of the datasheet. What should she do?
    13·1 answer
  • how do I delete my brainly account, my child signed up for it and nothing has been paid but I do not want the account to exist a
    7·2 answers
  • How does a junction table handle a many-to-many relationship?
    10·1 answer
  • The getElementById DOM Method do?
    13·1 answer
  • How does technology affect our daily lives essay
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!