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
Of the measures of feasibility in the accompanying figure, ____ considers points such as "Does the proposed platform have suffic
Pavel [41]

Answer:b. technical feasibility

Explanation: Technical feasibility is an important tool for both troubleshooting and maintenance,it is the process through which an expert evaluates a process or a product in order to determine what can either be achieved or to the extent to which a certain action will lead to a tangible result.

Technical Feasibility is one of the most important factor when making decisions on the use of materials or equipments in a particular environment or condition.

8 0
2 years ago
The _____ layer addresses how the software will execute on specific computers and networks.
lidiya [134]

The problem domain layer addresses how the software will execute on specific computers and networks.

A problem domain is a software engineering term that refers to all information that defines a problem and compels the solution.

A problem domain basically looks at only the area you are interested in and excludes the rest. It includes the goals the problem owner wishes to have and the context in which the problem exists. For example, if you are creating a website for selling artwork online, the problem domain will be artwork and eCommerce.

Therefore, in order to identify a problem domain, you need to know the relevant user requirements. This can be easy when you start by finding out what people (users) think the problem is.

#SPJ4

3 0
1 year ago
Read 2 more answers
Write a C# program named ProjectedRaises that includes a named constant representing next year’s anticipated 4 percent raise for
nydimaria [60]

Answer:

using System;

class ProjectedRaises {

 static void Main() {

     const float raise = 0.04f;

     double salary1 = 0.0f,salary2 = 0.0f,salary3 = 0.0f;

Console.WriteLine("Current salary for each employee: ");

     salary1 = Single.Parse(Console.ReadLine());

     salary2 = Single.Parse(Console.ReadLine());

     salary3 = Single.Parse(Console.ReadLine());

     salary1 = salary1 + raise * salary1;

     salary2 = salary2 + raise * salary2;

     salary3 = salary3 + raise * salary3;

     Console.WriteLine("Next year salary for the employees are: ");

     Console.WriteLine(Math.Round(salary1));

     Console.WriteLine(Math.Round(salary2));

     Console.WriteLine(Math.Round(salary3));

}

}

Explanation:

This declares and initializes variable raise as a float constant

     const float raise = 0.04f;

This declares the salary of each employee as double

     double salary1 = 0.0f,salary2 = 0.0f,salary3 = 0.0f;

This prompts the user for the salaries of the employee

Console.WriteLine("Current salary for each employee: ");

The next three lines get the salary of the employees

<em>      salary1 = Single.Parse(Console.ReadLine());</em>

<em>      salary2 = Single.Parse(Console.ReadLine()); </em>

<em>      salary3 = Single.Parse(Console.ReadLine()); </em>

The next three lines calculate the new salaries of the employees

<em>      salary1 = salary1 + raise * salary1;</em>

<em>      salary2 = salary2 + raise * salary2;</em>

<em>      salary3 = salary3 + raise * salary3;</em>

This prints the header

     Console.WriteLine("Next year salary for the employees are: ");

The next three lines print the new salaries of the employees

     Console.WriteLine(Math.Round(salary1));

     Console.WriteLine(Math.Round(salary2));

     Console.WriteLine(Math.Round(salary3));

7 0
3 years ago
ANYBODY WANNA PLAY FoRnITe
ValentinkaMS [17]

Answer:

No but my baby brother can play with u

6 0
3 years ago
Read 2 more answers
Which one of the following downloads and uploads files to and from a server? A. Client B. Internet protocol C. Server D. Worksta
earnstyle [38]
The answer is A. Client request and receive files to and from a server.
5 0
2 years ago
Other questions:
  • Consider the provided C++ code in the main.cpp file: The function func2 has three parameters of type int, int, and double, say a
    8·1 answer
  • (1) The given program outputs a fixed-height triangle using a * character. Modify the given program to output a right triangle t
    6·1 answer
  • George, a user, has contacted you to complain that his issue has not been resolved. He has already contacted your department twi
    9·1 answer
  • Give the appropriate term for each of the following.1. An easy-to-remember address for calling a web page (like www.code.org). 2
    8·1 answer
  • What will be the values of ans, x, and y after the following statements are executed? int ans = 35, x = 50, y =50; if ( x &gt;=
    7·2 answers
  • In C, how could I use a command line input to remove certain characters from an existing string? For example, if I have string '
    8·1 answer
  • Instructions
    8·1 answer
  • A. Suppose a CPU with a write-through, write-allocate cache achieves a CPI of 2. What are the read and write bandwidths (measure
    13·1 answer
  • 23. Convert the following to Megabytes<br> a) 2GB<br> b) 2056 Bytes-
    8·2 answers
  • Compare and discuss between electromechanical and electronic era of computer​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!