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
NEED HELP RIGHT NOW!!! Which of the following is the definition of a privacy policy? * 5 points - A legal document that an app o
Marina86 [1]

Answer:

A legal document that an app or a website must provide to describe the rules the company and users must obey when they use the app.

6 0
3 years ago
Which THREE of the following actions can you perform with most webmail services?
laila [671]

Answer:

C.find the email address of someone you know

D.maintain an address book of your contacts

E.organize your emails In folders

8 0
2 years ago
Please Help!!!<br> I keep getting this answer wrong
IgorC [24]

Answer:

I think its option a. and d.

Explanation:

option a. is right I'm sure.

option b. and c. are doubtful for me.

option d. can be true. but unlike a job letter, resumes carry a deeper view of the employee's accomplishments and qualifications.

but I still hold with option a. and b. if it's wrong please do inform, so I can refer.

5 0
3 years ago
To add text to a blank slide layout, _____.
Basile [38]
B, draw the text box
3 0
3 years ago
when a stock or bond certificate is delivered, it must be in good transferable form. if the certificate is badly mutilated, it m
Elena-2011 [213]

Authentication can be done by the issuer of the security.

What do you mean by authentication?

Authentication is the act of proving an assertion, such as a computer system user's identification. Authentication is the process of verifying a person's or thing's identity, as opposed to identification, which is the act of indicating that identity. It could entail validating personal identification documents, verifying the authenticity of a website with a digital certificate, carbon dating an artefact, or guaranteeing that a product or document is not counterfeit.

Only a party with access to particular company documents may authenticate a mutilated certificate. It is most likely the issuer, but it could also be the transfer agent or registrar.

To learn more about authentication
brainly.com/question/28240257

#SPJ4

6 0
1 year ago
Other questions:
  • Software design and implementation are interleaved activities. The level of detail in the design depends on the type of system b
    5·1 answer
  • Select all of the uses of presentation software in the workplace.
    8·1 answer
  • Was the big blue button thing a good decision or bad?<br> *I think it was a bad idea.
    15·2 answers
  • Write an HTML document which contains two text fields, a button, and a div. The first text field should be labeled “Temperature”
    10·1 answer
  • Match these step-by-step directions in the order that you will find them in this course.
    9·1 answer
  • In what other game can kids line up in a row
    6·1 answer
  • How do you give brianliest
    13·1 answer
  • I’ll mark brainlest
    14·2 answers
  • The advancement of technology in our daily lives has changed how we interact with the world.
    10·1 answer
  • Algorithm to eat orange<br><br>​
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!