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
shtirl [24]
2 years ago
7

Define stubs for the functions called by the below main(). Each stub should print "FIXME: Finish FunctionName()" followed by a n

ewline, and should return -1.
Computers and Technology
1 answer:
joja [24]2 years ago
3 0

Answer:

A stub method or merely a stub in software development is a code piece that performs various other programming functionality. It can copy the existing code behavior like a procedure on a remote machine like methods are quite frequently known as mocks or for a while working for a code that has not yet been developed.

Please check the explanation for more details.

Explanation:

A method stub in this intelligence is a method with no factual material, i.e. it's not deed what it is intended to do. Your getUserNum() method must return a user's unique ID, but in its place, you're indispensable a stub that merely returns -1 on every request.

Through the main method, you should define these methods:

Num1=getUserNum();

Num2=getUserNum();

avgResult = computeAvg(Num1, Num2);

Hence, define them. And below is how the above stub function should be like:

public static int getUserNum(){

System.out.println("FIXMR:Finish getUserNum()");

return -1;

And the whole program should look like:

import java.util.Scanner;

public class Main {

public static int getUserNum ()

{

System.out.println("FIXME: Finish getUserNum()");

return -1;

}

public static int computeAvg(int Num1, int Num2)

{

int avgResult = (Num1 + Num2)/2;

System.out.println("FIXME: Finish computeAvg()"); return -1;

}

public static void main(String[] args)

{

int Num1 = 0;

int Num2 = 0;

int avgResult = 0;

Num1 = getUserNum(); Num2 = getUserNum();

avgResult = computeAvg(Num1, Num2);

System.out.println("Avg: " + avgResult);

return;

}

}

You might be interested in
What two functions does tcp/ip perform?
svetlana [45]

The two functions does tcp/ip are:

  • Reassemble data packets at the destination.
  • Request servers for data the user wants.

<h3>What are the functions of TCP IP?</h3>

The role of the Transmission Control Protocol is known to be the one that helps to take in and put together the Data Packets while that of IP is to send the Data Packets to the right location or destination.

Therefore, The two functions does tcp/ip are:

  • Reassemble data packets at the destination.
  • Request servers for data the user wants.

Learn more about tcp/ip from

brainly.com/question/17387945

#SPJ1

4 0
1 year ago
Which of the following decimal (base-10) values is equivalent to the binary (base-2) value 101001?
garik1379 [7]

Answer:

D. 41

Explanation:

101001 is in base 2.

To convert 101001 to base 10;

1*2^5+0*2^4+1*2^3+0*2^2+0*2^1+1*2^0

1*32+0*16+1*8+0*4+0*2+1*1

32+0+8+0+0+1

=41

8 0
2 years ago
Jody should select the
Alex Ar [27]

Answer:

In the View tab, you will find Zoom Option. Set the Zoom level to 100%.

Explanation:

You need to set the Zoom level to 100%, And you can do this, by setting the zoom level to 100%, from the scroll bar. Or you can move to view tab in the main menu, and then in the Ribbon, you need to select the zoom % and set it to 100 percent. You will then be able to see the entire page. And if you want, you can increase the Zoom level to even further, for getting an even more clearer picture.

3 0
3 years ago
What is the purpose of copyfitting?
stiv31 [10]

Answer:

ms word can help you to writer and print

ur document and make u more attractive

Explanation:

a

3 0
3 years ago
Write a program that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending whe
Nana76 [90]

<u>Answer:</u>

<em>using System; </em>

<em>public class Program </em>

<em>{ </em>

<em> public static void Main() </em>

<em> { </em>

<em> String input ; </em>

<em> while(true) </em>

<em> { </em>

<em>  input = Console.ReadLine(); </em>

<em>  if(input.Equals(""quit"")) </em>

<em>  break; </em>

<em>  Reverse_String(input); </em>

<em> } </em>

<em> return; </em>

<em> } </em>

<em>static void Reverse_String(string input_text) </em>

<em>{ </em>

<em>    char[] text = input_text.ToCharArray(); </em>

<em>    Array.Reverse(text); </em>

<em>    Console.WriteLine(text); </em>

<em>} </em>

<u>Explanation:</u>

<em>In the above program a separate function is written to reverse the string.</em>

This method takes the string as an argument and place it in a array and then use the built-in function reverse and print the reversed string in the console.

<em>In the main(), the input is obtained from the console and it is passed to the reversestring(). </em>

7 0
2 years ago
Read 2 more answers
Other questions:
  • Which of the following is a collection of honeypots used to present an attacker aneven more realistic attack environment?a. Padd
    6·1 answer
  • Which of the following is an occupation management group? Select the choice that best answers the question.
    15·1 answer
  • How do I connect my CSS file and HTML page together? it's just not wanting to work for me. 
    5·1 answer
  • Which of the following specific components are incorporated on HDInsight clusters?
    13·1 answer
  • Excel spread sheets are primarily used to
    13·2 answers
  • Copyright laws protect:This task contains the radio buttons and checkboxes for options. The shortcut keys to perform this task a
    6·1 answer
  • What explains the discrepancy between the number of bytes you can
    13·1 answer
  • What feature is available to add a suggestion in the margin of someone else's document?​
    15·1 answer
  • DUE SOON NEED HELP FAST!!
    11·1 answer
  • Please help me with coding!
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!