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
In your own words, what is pair-programming? What is the role of the driver? What is the role of the navigator? What are some be
KATRIN_1 [288]

<u>Paired programming:</u>

Paired programming is a new technique where one person gets one another to<em> write the code</em>. Here one will write the code and other will start verifying as the type.

So we might think it is waste to employ two person for same task but it is not so. There are many <em>benefits in incorporating this technique</em>. Let us see those benefits one by one.

  • <em>Inter-personal skill gets improved </em>
  • <em>Lower amount of coding mistake </em>
  • <em>Learn from each other </em>
  • <em>Peer review enhance collaboration </em>

Challenges expect to arise during pair-programming

  • Two heads are superior to one. On the off chance that the driver experiences a <em>hitch with the code</em>, there will be two of them who'll take care of the issue.  
  • Builds up your <em>staff's relational aptitudes</em>. Working together on a solitary venture encourages your group to welcome the estimation of <em>correspondence and collaboration.  </em>

Overcome Method

The most ideal approach to move <em>toward blending</em> is to accomplice two software engineers and have them share a PC. The pair ought to have the option to choose how to part the work, and it is prudent that they should <em>switch jobs frequently.</em>

7 0
4 years ago
If you schedule a message to be delivered at 6 p.m., but you log out of your computer at 5 p.m., what will happen to the message
valentinak56 [21]

Answer: It will be delivered when you log back in.

Explanation:

It will be delivered when you log back in.

8 0
2 years ago
Usually, in organizations, the policy and mechanism are established by the:
Ivanshal [37]

Answer:

Sorry Sorry Sorry

Explanation:

Sorry Sorry Sorry

5 0
3 years ago
Read 2 more answers
I can’t get answers because the ads won’t load help me
Flura [38]

Answer: Get better wifi

Explanation: This maybe a router problem, Go to your router and reset it by unplugging the power chord, After 30 seconds plug it back in and wait for your wifi to start back up. Your ads should load now. Have a good day.

7 0
3 years ago
Select the correct answer
Kamila [148]

Answer:

a point at which the user chooses a certain path.

6 0
3 years ago
Read 2 more answers
Other questions:
  • To type the letter address, _________ space from the dateline
    9·2 answers
  • A proactive computer professional will _____. have a neutral outlook toward technology underestimate the impact of technology an
    13·2 answers
  • Which data table display compares report metrics to the website average?
    6·1 answer
  • You rub two red balloons against a wool scarf. What do you think will happen if you place the balloons near each other. Justify
    5·1 answer
  • List and describe four communication tools that are currently popular.
    9·1 answer
  • Gus has decided to organize his inbox on June 26th by using folders and deleting irrelevant messages
    10·2 answers
  • What is the minimum number of public IP addresses needed to expose a service running on 10,000 IoT devices having private IP add
    9·1 answer
  • Write a program that reads a list of integers into a vector, and outputs the two smallest integers in the list, in ascending ord
    5·1 answer
  • What are five (5) things about this career choice that appeals to you?
    7·1 answer
  • I don't know what to do for these two questions
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!