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
vlabodo [156]
4 years ago
6

Assume you need to test a function named max. The function max receives two int arguments and returns the larger. Write the defi

nition of driver function testmax whose job it is to determine whether max is correct. So testmax returns true if max is correct and returns false otherwise.
Computers and Technology
1 answer:
padilas [110]4 years ago
3 0

Answer:

bool testmax()                               // function definition

{  

//demonstrating working of the function max

if (max(1,2) == 2 && max(2,1) == 2 && max(1,1)==1)    

return true;                                  // true if the max functions correctly

else  

return false;                                //false for wrong functioning of max

}

Explanation:

Driver function:

A driver function is the one which demonstrates the code of library-style and solves problem. If a code contains some class A, driver functions would be functions that are in your code just to show that class A behaves as expected.

You might be interested in
Jack is part of the software quality assurance team in a company. Which activity should Jack perform as a part of software quali
gizmo_the_mogwai [7]

Answer:

C - testing

Explanation:

quality assurance is another name for verifying something. so when you verify software, you test the software.

3 0
3 years ago
Which of the following is not one of the most common causes of electrical accidents ?
defon

Cords too long. The cords may be a tripping hazard, but no electrical accident will occur because of it.

7 0
4 years ago
Read 2 more answers
Why is it preferable to code web pages in HTML format?
balu736 [363]

Answer:

its c on plato

Explanation:

5 0
3 years ago
What is the average gradient of the slope along the straight line CD
Anvisha [2.4K]

Answer:

is there a graph to go with this?

Explanation:

7 0
3 years ago
Lisa and her husband would like to buy a house soon. She continuously pays bills late. How do her actions affect her and others?
stiks02 [169]
Well actually it affects her credit. Home owners would not want to sell a house to someone who doesn't pay bills on time. It shows he/she is unreliable

3 0
3 years ago
Read 2 more answers
Other questions:
  • Explain how abstraction is used in a GPS system
    12·2 answers
  • When do on loop conditions happen? (1 point)
    5·1 answer
  • Intuitively, which of the following would happen to e⃗ net if d became very large?
    6·1 answer
  • A printer is connected locally on Computer1 and is shared on the network. Computer2 installs the shared printer and connects to
    10·1 answer
  • A PC is not able to connect to a wired network. Pinging the loopback address is successful, but the gateway cannot be reached. O
    12·1 answer
  • Which of the following allows the transmission of voice and often video communication over the internet?
    12·1 answer
  • Ayuda necesito 7 objetos que se utilizan en la vida diaria
    8·1 answer
  • Frank - as the Scrum Master of a Scrum Team - is invited for a Daily Scrum meeting at 9am. The teamgets together in front of the
    9·1 answer
  • Given main(), complete the Car class (in files Car.h and Car.cpp) with member functions to set and get the purchase price of a c
    6·1 answer
  • ___________________ describes the process of combining voice, video, and data communications over a common network infrastructur
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!