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
stepan [7]
3 years ago
14

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

he 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:
AnnZ [28]3 years ago
5 0

Answer:

public double max(double m, double n)

{

if (m>=n)

return m;

else

return n;

}

public int max(int m, int n)

{

if (m>=n)

return m;

else

return n;

}

public char max(char m, char n)

{

if (m>=n)

return m;

else

return n;

}

Explanation:

In each of the three methods declarations (Java) above, we are comparing two variables. m and n. The question did not specify what should happen when both variables are the same (i.e. m = =n). We make an assumption and set the condition to be if(m>=n) m should be returned as the greater.

You might be interested in
Roger wants to give semantic meaning to the contact information, which is at the bottom of the web page. To do this he will use
Elden [556K]

Answer:

Parent

Explanation:

HTML is an acronym for hypertext markup language and it is a standard programming language which is used for designing, developing and creating web pages.

Generally, all HTML documents are divided into two (2) main parts; body and head. The head contains information such as version of HTML, title of a page, metadata, link to custom favicons and CSS etc. The body of a HTML document contains the contents or informations that a web page displays.

In this scenario, Roger wants to give semantic meaning (an element conveying informations about the type of content contained within an opening and closing tag) to a contact information placed at the bottom of a webpage. Thus, in order to do this, he should use a footer element as a parent of the contact information and as such all instance variables that have been used or declared in the footer class (superclass) would be present in its contact information (subclass object).

4 0
2 years ago
At the beginning of Section 5.2, it is stated that multiprogramming and multiprocessing present the same problems, with respect
QveST [7]

Answer:

By definition, <u>multiprocessing</u> refers to the processing of multiple processes at the same time by multiple CPUs.

By definition, <u>multiprogramming</u> keeps programs in main memory at the same time and execute them concurrently utilizing a single CPU doing a context switch.

The first difference is that multiprocessing uses multiple CPUs and multiprogramming to utilize context switch to do concurrency in one CPU. Another difference is that multiprocessing is more expensive but more efficient than multiprogramming due that it allows parallel processing.

6 0
3 years ago
Using Amdahl’s Law, calculate the speedup gain of an application that has a 60 percent parallel component for (a) two processing
Nina [5.8K]

Answer:

a) Speedup gain is 1.428 times.

b) Speedup gain is 1.81 times.

Explanation:

in order to calculate the speedup again of an application that has a 60 percent parallel component using Anklahls Law is speedup which state that:

t=\frac{1 }{(S + (1- S)/N) }

Where S is the portion of the application that must be performed serially, and N is the number of processing cores.

(a) For N = 2 processing cores, and a 60%, then S = 40% or 0.4

Thus, the speedup is:

t = \frac{1}{(0.4 + (1-0.4)/2)} =1428671

Speedup gain is 1.428 times.

(b) For N = 4 processing cores and a 60%, then S = 40% or 0.4

Thus, the speedup is:

t=\frac{1}{(0.4 + (1-0.4)/4)} = 1.8181

Speedup gain is 1.81 times.

8 0
3 years ago
A __________ note is a private note that you leave for yourself or for other people who might use the presentation file
BaLLatris [955]

Answer:

The answer is that it is a speaker note.

Explanation:

It leaves a note for people that use presentation files. I use it all the time on my google slides.

7 0
2 years ago
charles, a security analyst, needs to check his network for vulnerabilities. he wants a scan that interacts with network nodes a
finlep [7]

Charles, a security analyst, needs to check his network for vulnerabilities. he wants a scan that interacts with network nodes and repairs security issues found. The kind of scanning that best describes Charles's requirements is: Active scanning.

<h3>Who is a Security Analyst?</h3>

A Security Analyst's responsibilities include the following:

Define, plan, execute, maintain, and improve security measures, policies, and controls. Writing reports and offering insights on the effectiveness of current security policies, incident response plans, disaster recovery plans, and other security-related information

Active scanning is a scanning approach that involves scanning individual endpoints in an IT network in order to retrieve more specific information.

Learn more about Security Analysts:
brainly.com/question/16354463
#SPJ1

6 0
1 year ago
Other questions:
  • ___________ is an unsecured client server application / protocol that transfers files between two computers.
    11·1 answer
  • When a hardware or software interrupt occurs, the CPU calls________
    14·1 answer
  • WHAT SO THESE THINGS THAT I'VE HIGHLIGHTED MEAN IN MICROSOFT WORD?
    12·1 answer
  • What happens it the offshore team members are not able to participate in the iteration demo due to time zone/infrastructure issu
    11·1 answer
  • Drag the correct type of update to its definition.
    14·1 answer
  • Define a class, addresstype, that can store a street address, city, state, and zip code. use the appropriate functions to print
    11·1 answer
  • An online journal or diary you create to share your thoughts, opinions and personal news is referred to
    13·1 answer
  • What is the effect of this program?
    5·1 answer
  • Write a method maxMagnitude() with two integer input parameters that returns the largest magnitude value. Use the method in a pr
    13·1 answer
  • Tamara is writing a program to organize students in a class and needs to use operators to organize student grades, then compare
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!