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
ANo _____ works by using the Internet to relay communications; it maintains privacy through security procedures and tunneling pr
dybincka [34]

Answer: virtual private network

Explanation:

A virtual private network, is normally refered to as a VPN is simply referred to as an encrypted connection which is done over the Internet. We should note that it usually take solace from a particular device to th network.

The function of the encrypted connection is to assist in the transmission of sensitive data. It works by using the Internet to relay communications and it maintains privacy through security procedures.

8 0
3 years ago
What is meant by saving a sheet document​
Zina [86]

Answer:

While you'll use Save or press Ctrl+S to save an existing workbook in its current location, you need to use Save As to save your workbook for the first time, in a different location, or to create a copy of your workbook in the same or another location.

5 0
3 years ago
In Excel, an anchor($) allows you to:
Oksana_A [137]
The answer is the letter B.
6 0
3 years ago
Read 2 more answers
Which component is likely to be a performance bottleneck on a workstation used to edit digital movies
rjkz [21]

Explanation:

The disk subsystem - the files will be too large to be stored completely in system memory and so must be streamed from the disk, which will need to be both large and fast.

4 0
3 years ago
...............................
Gemiola [76]

............................

Mark me brainliest^^

7 0
2 years ago
Read 2 more answers
Other questions:
  • My window key dont work and I dont have a fn button, what can I do?<br> PLS help me.
    12·1 answer
  • Before you start creating a database, you should first use paper to plan, test, and revise. True False
    7·2 answers
  • Which of the following values is an example of a floating point number?
    12·1 answer
  • Karen thinks she should go out with Blane, an unattractive, social misfit, because “If I don’t go out with him, people will thin
    7·1 answer
  • A personal computer system is composed of the processing unit, graphics board, and keyboard with reliabilities of 0.976, 0.785,
    8·1 answer
  • What is a googleplex?
    7·1 answer
  • Write the code to create a variable score and assign it the value 0?​
    6·1 answer
  • Is the<br>transmission and reception<br>of data between locations?​
    10·1 answer
  • Polynomial regression A common misconception is that linear regression can only be used to fit a linear relationship. We can fit
    11·1 answer
  • to see additional functions available in an open desktop, document or website what action should the user perform?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!