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]
3 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]3 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
If the speakers are not working on a laptop, what could be the problem besides the speakers?
Elena-2011 [213]

Answer:

Sound card

Explanation:

In computer or laptop music or sound files are stored in digital form. Sound card is the the device that is used to convert the digital form of music into analog to produce the signal that is compatible with speaker or microphone.

If the speakers are not working on the laptop, means there is no sound produced on speakers. It means that sound card is not working properly.

8 0
2 years ago
3. A vulnerability is: a. A hacker searching for open ports b. A known attack method c. An incorrectly implemented policy d. All
ELEN [110]

Answer:

A

Explanation:

A hacker searching for open ports denotes vulnerability of computer (to hacking).

Cheers

7 0
3 years ago
Suppose the m2 money supply is $13 trillion, including: $7 trillion in savings accounts $3 trillion in checking accounts $1 tril
tia_tia [17]

Answer:

M1 is equal to $ 4 trillion

Explanation:

M1 money supplies are liquid money supplies like cash, checkable deposits, traveler's check etc. It is equal to;

M1= coins and currency in circulation + checkable (demand) deposit + traveler's check.

M2 money supply are less liquid and is equated as;

M2 = M1 + savings deposit + money market fund + certificates of deposit + other time deposits.

Savings = $7 trillion

Checkable deposit = $3 trillion

Money market fund = $1 trillion

Currency = $1 trillion

Certificates of deposit = $1 trillion

M1 = currency + checkable deposit

= $1 + $ 3

= $4 trillion.

6 0
2 years ago
What are benefits of using debugging tools? Check all that apply.
vivado [14]

Answer:

It's

A. Debugging tools help programmers catch errors they might otherwise miss.

B. Debugging tools can save time.

D. Debugging tools help programmers make methodical assessments of the problem.

Explanation:

got it right on edge.

6 0
3 years ago
Without this step of the problem solving process you might solve the wrong problem, not know where to start, or not know when yo
STatiana [176]
Prepare should be the answer
7 0
3 years ago
Other questions:
  • Libby wrote an email to her friend. She pressed Shift and the number key 2 together to enter the email address. Which symbol did
    7·2 answers
  • This is not an appropriate business use for a wiki. editing corporate documents getting customer feedback project management pub
    11·1 answer
  • A user contacted the help desk to report that the laser printer in his department is wrinkling the paper when printed. The user
    5·1 answer
  • Write a program that prompts the user to enter the area of the flat cardboard. The program then outputs the length and width of
    15·1 answer
  • your friend's parent's are worried about going over their budget for the month. Which expense would you suggest is NOT a need?
    11·1 answer
  • (This is for photography segment exam btw)
    11·2 answers
  • How do you change your grade level
    10·1 answer
  • Give four advantages for ssd compared to hdd
    15·2 answers
  • Assume that x and y are boolean variables and have been properly initialized. !(x || y) || (x || y) The result of evaluating the
    10·1 answer
  • 1.Microsoft Word is a/an ........​
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!