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
Fiesta28 [93]
3 years ago
15

Can you structure this code in if-statements?

Computers and Technology
1 answer:
Naddika [18.5K]3 years ago
3 0
Not sure what quizScore1-5 is, but here it is. Also, I'm not entirely sure what language you're working with here, but null can't be returned as an integer. If it were a string, for example, it'd be possible as string is an object reference type.

public int getData(int dataNumber)
{
    if (dataNumber == 1)
        return quizScore1;
    else if (dataNumber == 2)
        return quizScore2;
    else if (dataNumber == 3)
        return quizScore3;
    else if (dataNumber == 4)
        return quizScore4;
    else if (dataNumber == 5)
        return quizScore5;
    else
        return 0;
}
You might be interested in
Which tool would be the best choice for removing and replacing the motherboard bios chip?
mamaluj [8]

An <u>IC extractor</u> would be the best choice for removing and replacing the motherboard bios chip.

<h3>What is a computer hardware?</h3>

A computer hardware can be defined as a physical component of an information technology (IT) or computer system that can be seen and touched.

<h3>The hardware components of a computer.</h3>

Some examples of the hardware components of a computer system and these include:

  • Random access memory (RAM).
  • Read only memory (ROM).
  • Central processing unit (CPU)
  • Keyboard
  • Monitor
  • Mouse
  • Motherboard bios chip

In Computer technology, an <u>IC extractor</u> would be the best choice for removing and replacing the motherboard bios chip.

Read more on motherboard bios chip here: brainly.com/question/17373331

#SPJ1

8 0
2 years ago
Which of the following is a major benefit of a peer to peer network?
boyakko [2]

Answer:

that people can help each other

Explanation:

6 0
3 years ago
Read 2 more answers
1 point
baherus [9]

Answer:

yes

Explanation:

it very big like my di- hope it helps  

3 0
2 years ago
Which term refers to the deliberate falsification of information?.
gulaghasi [49]

Answer:

The term misinformation refers to the deliberate falsification of information.

Explanation:

6 0
2 years ago
Select the correct answer from each drop-down menu.
malfutka [58]

Answer:

update and filtering or deleting

Explanation:

3 0
3 years ago
Other questions:
  • If the object instance is created in a user program, then the object instance can access both the public and private members of
    9·1 answer
  • To support an internet client, you must have six elements. the first three -- a computer, an operating system and tcp/ip -- are
    7·1 answer
  • Find a, b, and c<br> A a=4 square root of 6 b= 8 square root of 2 ; c= 4 square root of 2
    12·1 answer
  • What is an example of a source that is less likely to be copyrighted?
    5·2 answers
  • An educational institution has a number of buildings in the campus. Each building has its own independent network system, and al
    6·2 answers
  • Which screen should be open to customize or personalize a desktop background
    11·1 answer
  • IF YOU PLAY SURVIV&gt;IO WITH ME RIGHT NOW I WILL GIVE YOU BRAINLIEST<br> AND IM NOT KAPPING
    5·1 answer
  • If you want to work on all aspects of your presentation, switch to __________ view, which displays the Slide pane, Outline pane,
    7·1 answer
  • Cuando, Quien, Donde y Como empieza a funcionar Amazon?
    15·1 answer
  • What is the best file manager for windows 10?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!