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
guapka [62]
3 years ago
12

Write the definitions for three function named max. Each receives two parameters, of the same type, and returns the larger of th

e two values. Define one of these functions to apply to type double, another to type int and a third to type char.
Computers and Technology
1 answer:
GenaCL600 [577]3 years ago
8 0

Answer:

The method definition to this question can be given as:

Method definition:

double max(double x, double y)  //define method with double parameter  

{

if (x>=y)    //check condition.

return x;  //return value

else

return y;     //return value

}

double max(int x, int y)    //define method with integer parameter

{

if (x>=y)    //check condition

return x;    //return value

else

return y;  //return value

}

double max(char x, char y)   //define method with char parameter

{

if (x>=y)    //check condition

return x;    //return value

else

return y;    //return value

}

Explanation:

The above method definition can be described as below:

  • In the first method definition first, we define a method that is "max()". In this method we pass two variables as a parameter that is "x and y" and the datatype of this is double. Then we use a conditional statement. In the if block we check if variable x is greater then equal to y then it will return x else it will return y.  
  • In the second method definition, we define a method that is same as the first method name but in this method, we pass two integer variable that is "x and y". Then we use a conditional statement. In the if block we check if variable x is greater then equal to y then it will return x else it will return y.
  • In the third method definition, we define a method that is same as the first and second method name but in this method, we pass two char variable that is "x and y". Then we use a conditional statement. In the if block we check if variable x is greater then equal to y then it will return x else it will return y.
You might be interested in
Match each term in the second column with its correct definition in the first column. Write the letter of the term on the blank
Thepotemich [5.8K]

Answer:

1. Pie chart.

2. Goal seek.

3. Relative reference cell.

4. Data marker.

5. Chart sheet.

6. What-If-Analysis.

7. Rate = \frac {Amount \; of \; increase}{Base}

8. Order of operations.

9. Formula AutoComplete.

10. Axis.

11. Category axis.

12. Value axis

13. Value \; after \; increase = Base * Percent \; for \; new \; value

Explanation:

Microsoft Excel is a software application or program designed and developed by Microsoft Inc., for analyzing and visualizing spreadsheet documents.

A spreadsheet can be defined as a file or document which comprises of cells in a tabulated format (rows and columns) typically used for formatting, arranging, analyzing, storing, calculating and sorting data on computer systems.

Some of the terminologies and features of the Microsoft Excel software includes the following;

1. Pie chart: a chart that shows the relationship of each part to a whole.

2. Goal seek: a what-if-analysis tool that finds the input needed in one cell to arrive at the desired result in another cell.

3. Relative reference cell: in a formula, the address of a cell based on the relative position of the cell that contains the formula and the cell referred to in the formula.

4. Data marker: a column, bar, area, dot, pie slice, or other symbol in a chart that represents a single data point.

5. Chart sheet: a workbook sheet that contains only a chart.

6. What-If-Analysis: the process of changing the values in cells to see how those changes affect the outcome of formulas in a worksheet.

7. Rate = \frac {Amount \; of \; increase}{Base}: The mathematical formula to calculate a rate of increase.

8. Order of operations: the mathematical rules for performing multiple calculations within a formula.

9. Formula AutoComplete: the excel feature which, after typing - and the first letter of a function, displays a list of function names.

10. Axis: a line that serves as a frame of reference for measurement and that borders the chart plot area.

11. Category axis: the area along the bottom of a chart the identifies the categories of data, also referred to as the x-axis.

12. Value axis: a numerical scale on the left side of a chart that shows the range of numbers for the data points, also referred to as the y-axis.

13. Value \; after \; increase = Base * Percent \; for \; new \; value: the formula for calculating the value after an increase by multiplying the original value the base by the percent for new value.

5 0
3 years ago
Image files are grouped into two categories: _____.
EleoNora [17]
It is grouped according to raster and vector format. Raster format are images used in a computer or printed. Vector format stores data and is compressed. 

Examples of common raster formats usually used in a computer are; jpeg, png, bitmap, and gif. Vector formats are; CGM, SVG and 3D vector.
4 0
3 years ago
Quick question if anyone knows? How do you give brainlist? Please tell me if you know! ( Here if a chiaki gif for your too lol )
riadik2000 [5.3K]

Answer:

To give brainliest you need to click the little crown under the answer that someone has responded with! it should be located near the rate 5 stars!

Explanation:

hopefully this helps!! also yes yes ty for the gif<3

7 0
2 years ago
A major problem with alcohol adverstising is that
Pavel [41]

Answer:

A chronic disease characterized by uncontrolled drinking and preoccupation with alcohol.

Alcoholism is the inability to control drinking due to both a physical and emotional dependence on alcohol.

Symptoms include a strong need or urge to use alcohol. Those with alcohol use disorder may have problems controlling their drinking, continue to use alcohol even when it causes problems, or have withdrawal symptoms when they rapidly decrease or stop drinking.

Treatment involves counseling, such as behavioral therapy, and medications that reduce the desire to drink. Some people need medical detoxification to stop drinking safely. Mutual support groups help people stop drinking, manage relapses and cope with necessary lifestyle changes.

Explanation:

8 0
3 years ago
A network administrator has been creating a baseline of network performance. During this process, he realizes that one router is
LiRa [457]

If the network administrator found that one of his routers is slow in performance better to check the traffic packet transactions. If any huge file size is been transferred better to disconnect the router and reconnect.

Possible to kill the network task packet so the network speed can be restored.

<u>Explanation:</u>

Moreover, possible to scan the end-user PC or workstation or desktop whether any malware or spyware is affected, if so better to remove that particular PC or workstation or desktop to disconnected from the router.

Updating the PC or workstation or desktop OS patches to be done at regular intervals.

5 0
3 years ago
Other questions:
  • What part of a check is the LEAST important?
    14·2 answers
  • When using correct ergonomic technique be sure to
    6·2 answers
  • Your desktop, internet explorer, and the media player can be started from this area on most computers
    9·1 answer
  • Create a class named CarRental that contains fields that hold a renter's name, zip code, size of the car rented, daily rental fe
    13·1 answer
  • HELP
    11·1 answer
  • In order to preview an attachment in an e-mail, click the attachment in the ______
    8·1 answer
  • Give an idea of a law u would like to create
    5·2 answers
  • What is a trojan horse
    8·2 answers
  • Suggest three ways in which celebrating an occasion influences food choices?
    10·2 answers
  • What is the accurate description
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!