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
A fireplace in a blacksmith shop is called a
astraxan [27]
They are called forges
5 0
3 years ago
Which parts of the forebrain are sometimes described as the “executive center” and can be likened to the central processing unit
8_murik_8 [283]

I guess the correct answer is Frontal Lobes

Thе frοntal lοbе is thе part οf thе brain that cοntrοls impοrtant cοgnitivе skills in humans, such as еmοtiοnal еxprеssiοn, prοblеm sοlving, mеmοry, languagе, judgmеnt, and sеxual bеhaviοrs. It is, in еssеncе, thе “cοntrοl panеl” οf οur pеrsοnality and οur ability tο cοmmunicatе.

6 0
4 years ago
this device can be used to type documents,send email,browse the internet,handle the spreadsheets,do presentations,play games,and
yanalaym [24]

Answer:

im pretty a computer

Explanation:

A computer is an electronic device that manipulates information, or data. It has the ability to store, retrieve, and process data. You may already know that you can use a computer to type documents, send email, play games, and browse the Web.

3 0
3 years ago
This lesson introduced the notion of "efficiency" in programming, and that it might mean different things at different times. Th
Morgarella [4.7K]

Answer:

<u>In physics</u>, efficiency is a measure of how much energy is conserved in a process.

<u>In programming</u>, efficiency is directly linked with the speed of runtime execution for software and algorithmic efficiency.

In this comparison, both meanings try to measure the quality of the processes and have formulas to detect this efficiency.

Both meanings have different formulas to define the measures, Big O notation for programming and percentage of energy output divided by energy input for physics. Furthermore, in physics is not possible to get 100% efficiency, but it is possible for programming to have O(1) of efficiency.

4 0
3 years ago
Design a circuit with the following criteria. Assume existence of +5V power supply. Draw your circuit and show your work. i. Inp
tresset_1 [31]

Answer:

see attached

Vin -5V- +5V

Input current : 500 x 10^-6 A

V_r: 0V 5V

I_r: 1 mA

Explanation:

Step 1: Circuit Designing: you have to address the question what is your proposed circuit going to do (its function).

Step 2: Decide on circuit components that can address each such circuit functions.

Step 3: Decide on the operational specification for the circuit: voltages, currents, frequencies etc.

Step 4: Simulate your circuit to confirm if it works as expected with simulation software such as Multisim.

4 0
3 years ago
Other questions:
  • Why is it so important that you know how much traffic dfs replication requires?
    13·2 answers
  • By placing the chorale melody in the highest voice and using a simple harmonization, bach made it easier for congregation member
    5·1 answer
  • How to upgrade from office home to office professional
    13·1 answer
  • Average LCD panels are around _______________, which most monitor authorities consider excellent brightness.
    13·1 answer
  • It chapter 2 pennywise
    13·1 answer
  • Someone hacked into an employee's computer and erased all of their data. All data for the past three weeks was lost as that was
    8·1 answer
  • What is a distraction that you find when photographing animals at the zoo
    11·1 answer
  • 4) Wilkes continues to discuss the concept of time and how it relates to the type of photography he does. Why do you feel that t
    12·1 answer
  • Write a Python program that uses function(s) for writing to and reading from a file:
    15·1 answer
  • Order the steps needed to design a relational database.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!