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
Interruption attacks are also called ___ attacks:
Lelu [443]

Answer:

Interruption attack are also referred to as Denial Of Service(DOS) attack.

Explanation:

Interruption attack are also called denial of service.The main aim of  interruption attack or Denial Of Srvice attack is to make resources unavailable.

For example:- wordpress.com had an DOS attack that took down their servers hence the service was unavailable for it's users.

Hence we conclude that the answer to this question is Denail of Service (DOS).

4 0
3 years ago
The system where the unit of measurement is centimeter
aleksklad [387]

Answer:

International System of Units

Explanation:

3 0
3 years ago
Image-editing software is used to _____.
bulgar [2K]

Answer:

B)enhance a photograph

3 0
3 years ago
Read 2 more answers
A Write about why it is important for a person to upgrade their job skills
Alexxx [7]

It is important for a person to upgrade their job skills because upgrading their skills will Increase their self-confidence, Helps to learn new techniques at work, Keep Your Knowledge Up-to-Date, increase your ability  in order to do your job well, and so on.

<u>Explanation:</u>

The most significant purposes behind abilities improvement in an association is for the development significant by and by and in an association. Workers need to remain learning so as to develop. At the point when you are going after another position, it's extremely significant that you can exhibit that you stay up with the latest. With certain callings, it's obligatory.

And, the more the abilities hole is developing, the more significant these three viewpoints become. This is on the grounds that we have to unmistakably comprehend whether it is information, expertise or capacity that should be created.

7 0
3 years ago
Every brand of computer has its own binary language, called
Kaylis [27]
Machine language.

Hope this helps
6 0
3 years ago
Other questions:
  • : How does the founder of Wikipedia keep a tight reign on accuracy? HELP PLEZ AT LEAST A PARGRAPH PLES
    6·1 answer
  • What is the smallest unit of data on the hard drive?
    5·1 answer
  • Choose the statement that describes an advantage of paying a bill through the mail with a check.
    6·2 answers
  • The biggest limitation of a network operating system (NOS) is _____ in terms of memory, process, device, and file management.
    7·1 answer
  • write a pay-raise program that requests a person's first name, last name, and current annual salary, and then displays the perso
    6·1 answer
  • What does running the “sudo” command do?
    6·1 answer
  • Which option is the primary means of communication for coauthors working on PowerPoint presentations?
    10·1 answer
  • Para ti que es el sexting​
    11·1 answer
  • Create One print command in LOGO​
    12·1 answer
  • You use a Windows desktop system to edit and produce audio files. Your system has two hard disks installed. Your applications ar
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!