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 of these is an example of an input?
boyakko [2]

Answer:

typing on a key board

this is the best Ans.

8 0
3 years ago
How old am i <br> (Will give brainliest)
diamong [38]
You’re probably thirteen
4 0
3 years ago
What level of system and network is required for cui
galben [10]

Answer:

CUI will be classified at a “moderate” confidentiality level and follow DoDI 8500.01 and 8510.01 in all DOD systems. Non-DoD systems must provide adequate security with requirements incorporated into all legal documents with non-DoD entities following DoDI 8582.01 guideline

Explanation:

6 0
3 years ago
A technician who is managing a secure B2B connection noticed the connection broke last night. All networking equipment and media
pashok25 [27]

Answer:

<u>d. CRL</u>

<u>e. OCSP</u>

Explanation:

Note, the term PKI stands for Public Key Infrastructure.

Among all the PKI components, the CRL (CERTIFICATE REVOCATION LISTS), which contains a list of issued certificates that were later revoked by a given Certification Authority, and the PFX format used for storing server certificates should be examined by the technician use to validate his assumption.

7 0
3 years ago
You have just assembled your first PC. You hit the power button and the computer turns on. As the computer runs through POST, it
Paha777 [63]

Answer:

Explanation:

If the HDD is spinning, this means that the power cable is correctly connected and that the drive is receiving power and powering on. However, this does not mean that the HDD is functioning correctly and reading the information. Therefore, the next logical step would be to check the SATA cable that connects the drive to the motherboard. The cable may be broken or maybe the SATA slot on the motherboard. Switch out the cables and plug it into another slot. If this does not work, then it may be that the HDD is broken. Multiple Beeps can also mean that the RAM or CPU is not plugged in correctly or broken.

6 0
3 years ago
Other questions:
  • What are the three main purposes of an operating system? Explain how the old mainframe computers were different from the compute
    12·1 answer
  • What tips or techniques should you keep in mind when shooting photographs on a rainy day?
    6·1 answer
  • Write a statement that terminates the current loop when the value of the int variables x. and y.are equal
    12·1 answer
  • How many instructions can the microprocessor execute each second if the assembly line is present?
    12·1 answer
  • Using the media as equipment for living. Explain how you would use some form of media to serve a purpose in your life—and what t
    6·2 answers
  • Computer software licensed under exclusive legal right of the copyright holder with the intent that the licensee is given the ri
    6·1 answer
  • Give two advantages of representing integers in pure binary.
    5·1 answer
  • A desktop computer is a type of mobile device.<br><br> a. true<br> b. false
    5·1 answer
  • The default for automatic replies in outlook is what?
    6·2 answers
  • What is the difference between a computer’s RAM and its hard disk?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!